本文共 233 字,大约阅读时间需要 1 分钟。
在测试两个不同的代码时发现的。
其实也理解,一个是新建一个空的promise,另一个是新建的promise马上执行,去分支resolve状态,
当然就空的在后。
输出:
3test.html:69 4test.html:74 6test.html:78 8test.html:59 promisetest.html:71 5test.html:64 promise2test.html:56 2test.html:61 setTimeout in microtask
转载地址:http://jkufm.baihongyu.com/