Mutable vs Immutable
- Mutable refers to objects that can be changed after they are created
- Immutable refers to objects that cannot be altered once they are created
let x = [...]
// fun() can alter values in `x`
// can return value
x.fun() //Mutable
// something() can do somethingπ without changing values in `x`
// can return value
x.something() //Immutable