var i =1;for(i; i<10; i++){(function(num){ setTimeout(function(){ console.log(num); }, num*1000); })(i);}