COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
A structure that doesn’t allow changes to data
|
|
A structure that doesn’t allow its data to be edited
|
|
A structure that doesn’t allow its data to be deleted
|
|
A structure that doesn’t allow its data to be moved
|
Detailed explanation-1: -An immutable object as the name suggests is an object whose state can’t be changed or modified after it is created. Examples of immutable data structures in JavaScript are numbers and strings. Examples of mutable data structures in JavaScript are objects, arrays, functions, classes, sets and maps.
Detailed explanation-2: -Immutable data structures are ones that cannot be changed once they are created, meaning that the values inside them can’t be added, removed or changed. Instead of changing the data structure we make a new version of the data structure which is a separate value.
Detailed explanation-3: -Immutable data types are those, whose values cannot be modified once they are created. Examples of immutable data types are int, str, bool, float, tuple, etc.
Detailed explanation-4: -In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created. This is in contrast to a mutable object (changeable object), which can be modified after it is created.
Detailed explanation-5: -Certain data types are immutable, which cannot be changed further after executing a program like an int, float, bool, string, Unicode, tuple.