JavaScript 'var' Usage
The cluster debates avoiding the 'var' keyword in JavaScript, promoting immutable constants with descriptive names since variables rarely vary, with irony noted in examples simulating variables.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Really should invent a new name if you don't want your variables to vary
Slightly ironic that it says you don't need variables, then in the example (and without comment) simulates one
More like "if the person who wrote this code didn't want to use the var keyword"
There should be a law that says: "one shall not use var in JavaScript code examples"
They're not variables if they don't vary ;)
i do the same because i find the var keyword ugly
What's wrong with introducing an extra variable compared to introducing a comment?
const var would become a nice contradiction...
That's.... creative... I particularly love how the variable names keep changing in inconsistent ways, but also sometimes reuse older names.
Fair point. "value" and "var" then, perhaps?