SOURCE

for(var i=0;i<5;i++){
    setTimeout(function(){
        console.log(i)
    },1000)
}
console 命令行工具 X clear

                    
>
console