Refer to the code below:

Refer to the code below:

Let str = ‘javascript’;

Str[0] = ‘J’;

Str[4] = ’S’;

After changing the string indexvalues, the value of str is ‘javascript’.

What is the reason for this value:
A . Non-primitive values are mutable.
B . Non-primitive values are immutable.
C . Primitive values are mutable.
D . Primitive values are immutable.

Answer: D

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments