function fn1 () {
for(var i=0;i<4;iPP){
var tc=setTimeout(function(i){
console.log(i);
clearTimeout(tc)
},10,i);
}
}
fn1 ()
Why do you say that this examines the understanding of closures?
which part is a closure? The outer part of the
function calls the variables inside the function, but how does the closure here reflect this concept?