3 ms·
By the way, you don't need to use let in your original code. const x = {}; x.a = 123; You're not changing x, you're changing a property of the object it p
by scottmf 9y ago
By the way, you don't need to use let in your original code.
const x = {};
x.a = 123;
You're not changing x, you're changing a property of the object it points to.
- KirinDave 9y agoThis is more a declaration of intent. I am aware that const doesn't stop property modifications, and I think it's ridiculous. I try to use "const" to mean "I never intend to change this." And I keep lobbying people to give us a better const keyword. But thank you, I appreciate the feedback.