DEV Community

Azaan Suhail
Azaan Suhail

Posted on

Complete JavaScript in 17 days!

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)