JS OOP 简单示例

function stopWatch() { let startTime = null let endTime = null let running = false let duration = 0 this.start = function () { if (running) { throw new Error('stoWatch is running!'
相关文章
相关标签/搜索