+ 3

Really immutable? As it says about const variables in JavaScript tutorial (https://www.sololearn.com/learn/JavaScript/2969/)

If an object cannot be reassigned doesn't mean its immutable. Immutable means unchangeable like tuples in pyhon.

22nd Mar 2019, 10:06 AM
Vladick
1 Resposta
+ 4
You're right. Const doesn't mean immutable. This is what MDN website says: "The const declaration creates a read-only reference to a value. It does not mean the value it holds is immutable, just that the variable identifier cannot be reassigned". If you find something wrong, kindly inform it to SoloLearn at info@sololearn.com It'll be helpful for the community as well☺️
25th Mar 2019, 2:11 AM
Шащи Ранжан
Шащи Ранжан - avatar