2 ms·
This is a highly bizarre take. Do you also object to text types being referred to as strings when they're not actually rope? Because if it's the misleading nami
by vunderba 3y ago
This is a highly bizarre take. Do you also object to text types being referred to as strings when they're not actually rope? Because if it's the misleading naming convention, then you have to be consistent in your argument.
Constants are a way to give magic numbers a meaningful name, and at the same time guarantee some minimal form of type safety by instructing the compiler/VM/Linter that they're not allowed to be mutated.
Also, I don't think I've seen any JavaScript tutorial teach anyone to use var for YEARS, it's really just let and const.