In a JS tutorial i have come to learn that primitive datatypes are immutable. However i'm not sure as to how datatypes are immutable. Like in what way are they immutable?
Do they mean that an immutable primitive datatype can only have it's value changed by way of assignment and not with an operation?
But objects however are mutable. Can someone explain how primitive values are immutable and show an example of how properties of an object are changed in a "mutable" way?