But here's the thing about const in JavaScript: it ONLY makes sure that the reference isn't reassigned. But when you use a keyword like const, it implies to you that the thing you're creating is constant, and will remain unchanged throughout the life of the reference. But that's not true.
It is true. The reference (pointer) cannot be reassigned. The object that is being referenced/pointed to can still be modified. In C++, this is the equivalent of a constant pointer to a non-constant object.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It is true. The reference (pointer) cannot be reassigned. The object that is being referenced/pointed to can still be modified. In C++, this is the equivalent of a constant pointer to a non-constant object.