I can't understand what is happening inside this code, it prints 13 only.
/*jshint loopfunc: true */
for(var i=0;i<13;i++)
setTimeout(function(){console.log(i)},10);
The output is
13
13
...[10 times more]
13
How can I print 0,1,2,...,12 with lambdas like how I wish to do?