Ling Zhenhua

Results 1 comments of Ling Zhenhua

1.2 Promise 版本运行报错是为何 //我又仔细看了看,没有错,在chrome里的console我直接粘贴进去没加分号,尴尬,不过直接在node.js运行的话,就没问题 `function sleep(time) { return new Promise(resolve => setTimeout(resolve, time)) }; const t1 = +new Date(); sleep(3000).then(() => { const t2 = +new Date(); console.log(t2 - t1);...