ES6 and Typescript Tutorial - 7 - let in for loops

preview_player
Показать описание

📱 Follow Codevolution

'let' us make our life easy with for loops!

ES6 | ES2015 | Typescript | ES6 Tutorial | ES2015 Tutorial | Typescript Tutorial | ES6 Tutorial for Beginners | ES2015 Tutorial for Beginners | Typescript tutorial for Beginners
Рекомендации по теме
Комментарии
Автор

this video: the importance of using let in a loop.
We should always use 'let' in closures and loops.

toannew
Автор

this video: the importance of using let in a loop.
We should always use 'let' in closures and loops.
Coz 'var' will send final value to timeout function. 'let' will send for each loop

vigneshgvs
Автор

This happens because event loop first execute all synchronous tasks ( task ) already present into stack, then execute asynchronous task ( jobs ) present into Callback Queue... even if we put some like setTimeout(<your_function>, 0).. i meant 0 milisecond, this setTimeout will be push into Callback Queue, which means it has to wait for Event loop finish every single sinchronous tasks

victorpinedo
Автор

I think my interviewer seen this series before me else I would have clear my interview if given after watched this

TheUltimateTrainJourney
Автор

bro this was really cool and knowledgeable. thanks

rohitkudalkar
Автор

can someone explain why is the output 6 with "var"?

multijokker
Автор

Have you made any tutorial on JS concepts like closure & promise? Please share the link.

kailashuniyal