I tried to change the first letter of 'javascript' to 'J' and the fourth letter to 'S', but all I got was 'javascript'. I guess the string was like 'Nah, you can't touch this!'
Okay, so I was totally convinced it was A) Non-primitive values are mutable, but now I'm second-guessing myself. These JavaScript questions can be tricky!
Ah, I was about to choose C) Primitive values are mutable, but then I remembered that strings are special in JavaScript. Gotta love those language quirks, am I right?
I'm pretty sure the answer is D) Primitive values are immutable. Strings are primitive data types in JavaScript, so you can't actually modify the individual characters of a string. That's why the value of 'str' didn't change after the attempted changes.
Sarina
1 months agoKrissy
10 days agoYoulanda
21 days agoTimmy
22 days agoMariann
1 months agoTabetha
2 days agoCandida
6 days agoCammy
1 months agoMarica
2 months agoCyril
6 days agoFausto
10 days agoCarlton
2 months agoDomingo
2 months agoFrancisca
28 days agoNidia
29 days agoSusy
2 months agoLeonida
2 months agoBroderick
3 months ago