4 ms·
so is object(array,map,etc) in javascript, many scripting languages have non-primitives mutable, the OP seems wrong on this claim(e.g. only PHP does that)
by synergy20 5y ago
so is object(array,map,etc) in javascript, many scripting languages have non-primitives mutable, the OP seems wrong on this claim(e.g. only PHP does that)
- TazeTSchnitzel 5y agoThey aren't value types in JavaScript or Python, they're reference types (as are all types in those languages). Mutable value types are different from both mutable reference types (Python list, JS Array, strings in both languages, etc) and immutable reference types (Python and JS strings, Python tuples…)