2 回答

海綿寶寶撒
TA貢獻(xiàn)1809條經(jīng)驗(yàn) 獲得超8個贊
var AI = function () { this.timeout = null; this.cancel = function () { clearTimeout(this.timeout); return this; } this.talk = function () { this.timeout = setTimeout(() => console.log('talk')); return this } }var ai = new AI() ai.talk().cancel()
- 2 回答
- 0 關(guān)注
- 749 瀏覽
添加回答
舉報
0/150
提交
取消