How JavaScript variable scoping is just like multiple levels of government

Kevin Kononenko on February 08, 2018

Have you ever smashed your keyboard in frustration after getting an undefined* *value over and over again while trying to find the value of a var... [Read Full]
 

Well splained Kevin... I do have a question though. Why are we referring to Consts as “variables” since by their definition a Const is immutable shouldn’t they be called Constants? Or am I missing something very fundamental?

 

Good question, Guido. According to the Microsoft docs, consts are technically variables: docs.microsoft.com/en-us/scripting...

Check out my guide to variables at the bottom. Variables are just containers for values that you initialize. So, a const still fulfills that definition.

blog.codeanalogies.com/2017/12/20/...

 

Very nice post with the example which is appealing to the imagination. Cheers.

 
 
 
 

Haha I will take that as a compliment :) Have you seen the rest of my tutorials? They are even further out there :)

 

I think this confused me a little because I have no idea how the law works in the US.

 

I love it when coding concepts are broken down into easy to understand concepts outside of code. This was a great analogy.

 
code of conduct - report abuse