I am stuck in this code this code should return 0,1,2 value but it is returning three three times how is this happening
for(var i = 0; i<3; i++){ let log =()=>{ console.log(i)} setTimeout(log,100) }