4 ms·
Yes, but it’s with the caveat that (like C++) const does not mean that the whole value is constant. It doesn’t even really mean any part of the value is constan
by ironmagma 5y ago
Yes, but it’s with the caveat that (like C++) const does not mean that the whole value is constant. It doesn’t even really mean any part of the value is constant necessarily, just that the symbol cannot be reassigned.
I don’t know that it eliminates that many questions, but it does eliminate one question, which is whether that variable will be reassigned. Arguably that doesn’t tell you very much.
- bern4444 5y agoIts more for style true, but I also try to avoid directly modifying an object's properties and values.