Exam4Training

Refer to the code below:

Refer to the code below:

Let str = ‘javascript’;

Str[0] = ‘J’;

Str[4] = ’S’;

After changing the string index values, 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

Exit mobile version