const can neither be re-assigned nor updated, it is constant(doesnβt change).
I think that is a little misleading. The reference is constant, the object is not; fields can be reassigned and added.
constx={y:'x is const'};x.y='y is not';x.a='here is a new property';console.log(x.y);// y is notconsole.log(x.a);// here is a new propertydeletex.y;console.log(x.y);// undefined
You can not reassign an object or an array but you can still change the values or properties.
Let me change the text a little.
Thanks for pointing this out Robert, yeahhhh :)
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.
I think that is a little misleading. The reference is constant, the object is not; fields can be reassigned and added.
Colloquially, those are all updates.
You can not reassign an object or an array but you can still change the values or properties.
Let me change the text a little.
Thanks for pointing this out Robert, yeahhhh :)