0
Mutable and non-mutable data types in JavaScript ?
In the below article it is written that "objects & classes" are mutable. But as far as I know there is no such concept like "classes" in JavaScript. Also "objects" includes arrays, functions etc. then why are "objects" explicitly classified in mutable category. LINK: https://benmccormick.org/2016/06/04/what-are-mutable-and-immutable-data-structures-2
1 Resposta
0
Btw. ES6 introduced classes.
Every object in JS is mutable. You can always add and change members. Even const objects are mutable.