var, let, and const – Why to avoid var 😷 and how to put the other two to good use? - Javascript
Differences between var, let and const, why we should avoid var and prefer const.
Hello reader,
This time I have really cool stuff which every javascript developer misses or skipped in their initial learning of javascript.
In this article, I have written about the three most important keywords of javascript namely var, let
and const.
I have also discussed why var
should be avoided and make good use of let and const. I have also discussed hoisting
in javascript and also discussed Immediately Invoked Function Expression(IIFE).
More about var, let
and const
at var, let, and const.
If you find the article interesting please share with your friends. Also if you find any error/typos in the article please let me know so that I can rectify the errors/typos.
Happy reading!
Stay home and stay safe.