JavaScript: Understanding the difference between var, let and const

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…