Damien Bactawar5,544 Points
Would, "const = 43;" still be classified as "variable declaration"? It sounds more like "constant declaration". LOL!
Just a light-hearted question however one wonders about the decisions the ECMA make. If people structure their code correctly is block level scope something that you have to worry about? Are they making developers live easier? Actually I'm just joking. I'm sure it is progress. I'm too junior to be making these judgments.
Steven Parker177,495 Points
Well, first off, "
const = 43;" isn't valid syntax. You'd need to have an identifier name between the keyword "const" and the assignment operator, something like "
const answer = 43;"
But yes, this is still referred to as a variable. A mathematician would argue that it's a constant and not a variable, but in programming lingo, it's a "variable" that happens to be "immutable" (or it has the property of being "constant").
And block scope does indeed make development easier (or at least less error-prone) once you're used to using it.