📜  不带参数的 setTimeout - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:13.479000             🧑  作者: Mango

代码示例1
/*
setTimeout removes the function from the execution queue and it will only be invoked after JavaScript has finished with the current execution queue. 
*/

console.log(1);
setTimeout(function() {console.log(2)});
console.log(3);
console.log(4);
console.log(5);
//console logs 1,3,4,5,2