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!'
相關文章
相關標籤/搜索