I am bit confused, Wikipedia (I know, I know) defines immutability as
immutable object is an object whose state cannot be modified after it is created.
while the JS implementation example states
In JavaScript, some built-in types (numbers, strings) are immutable
I understand now that in JS both Numbers and Strings are Objects but why would they be considered immutable when I can clearly change the value of any Number or String variable?
var x = 42assigns an immutable number/value 42 to your variable. if you dox++; then the 42 is destroyed and replaced with a new immutable number: 43.