feat: 新增实验 7 的第 2 部分
This commit is contained in:
23
Server/tests/test7/7.1/index2.js
Normal file
23
Server/tests/test7/7.1/index2.js
Normal file
@@ -0,0 +1,23 @@
|
||||
console.log("Start");
|
||||
|
||||
setTimeout(() => {
|
||||
console.log("Timeout1");
|
||||
}, 1000);
|
||||
|
||||
let a = 1;
|
||||
const intervalId = setInterval(() => {
|
||||
console.log(a++);
|
||||
clearInterval(this);
|
||||
clearInterval(intervalId)
|
||||
}, 1000);
|
||||
|
||||
setTimeout(() => {
|
||||
console.log("Timeout2");
|
||||
}, 1000);
|
||||
|
||||
setImmediate(() => {
|
||||
console.log("Immediate");
|
||||
});
|
||||
|
||||
console.log("End");
|
||||
|
||||
Reference in New Issue
Block a user