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)}
The text was updated successfully, but these errors were encountered:
in page interview/js2.html (Closures Inside Loops part), the Solution code is
but in this solution, the setTimeout's milliseconds set not work, because you use the IIFE (Immediately Invoked Function Expression), and should become
The text was updated successfully, but these errors were encountered: