You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but in this solution, the setTimeout's milliseconds set not work, because you use the IIFE (Immediately Invoked Function Expression), and should become
for(vari=0;i<10;i++){setTimeout((function(i){returnfunction(){console.log(i)};//return a new function})(i),10)}