Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5
Immutable objects can't be changed after it is created. It means you can't modify their values/elements For example strings in JS var str = "David" // declaration str[0] = 'A' //. Wrong because strings are immutable /†******************************/ Mutable objects are those that can be change later For example arrays var arr = [ 1, 2, 3] arr[0] = 1000 //. valid
2nd Mar 2022, 8:39 AM
NonStop CODING
NonStop CODING - avatar