for ( var i = 1; i <= 5; i++ ) {
setTimeout( function timer() {
console.log( i );
}, i * 1000 );
}
What I want to ask is that since the output is 6, the time interval should also be 6,but tht time interval is 1*1000. This is 《you don't know js》page 46。 I understand why the output is 6, but I don't understand why the interval is not 6