for (var i = 0; I < 5; iPP) {
setTimeout(() => { //----1
console.log(i);
}, 0)
}
for (var k = 10; k < 15; kPP) {
setTimeout (function (k) {/ / Anonymous function self-execution-2
console.log(k);
} (k), 0)
}
will the self-executing function in the second setTimeout still be put in the queue? if it is put in the queue, how can it be executed before / /-- 1 in the queue?-sharp-sharp-sharp topic description
sources of topics and their own ideas
related codes
/ / Please paste the code text below (do not replace the code with pictures)