JavaScript: Understanding the difference between var, let and const

Todd Davis
7 min readFeb 28, 2019
Photo by Markus Spiske on Unsplash

If you’ve been coding in JavaScript for any length of time, you’ve probably typed the word var into your IDE so many times by now that you probably don’t even think about it anymore. It works, it’s easy, and unlike most strongly-typed languages, you don’t have to fret too much over considering what type of variable to declare. And that’s one of the beautiful things about…

--

--

Todd Davis

This is my life. These are my words. If I choose to own my life story, then I can decide how the story ends.