When I started learning JavaScript, I used to get super confused between let, const, and var ๐ตโ๐ซ
All three looked the same to me until I made a simple table like this โ
โ
And guess what? It made everything so clear in just 2 mins!
Hereโs what finally clicked for me:
- var is old-school and can be used anywhere inside a function
- let and const are modern and work only inside curly braces {}
- const is like a strict teacher โ once set, canโt change ๐
This small concept wasted a lot of my time earlier.
Hope this helps someone who's stuck like I was ๐
Top comments (0)