84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
Numbers that are not printed in the log also take up time. Why and how to solve it?
What do you want to express?
It is also the same as the closure in the for loop, wrapping a layer on the outside to execute the function immediately
function resort(){ for (let i = 0; i < 10; i++) { for (let j = 0; j < 10 - i; j++) { (function(a,b){ setTimeout(function(){ console.log(a*10 + b); },(a*10+b)*500); })(i,j) }; }; } resort();
I don’t know if this is what it means
What do you want to express?
It is also the same as the closure in the for loop, wrapping a layer on the outside to execute the function immediately
I don’t know if this is what it means