Consider following snippet:
 var s = 'Hello world'; s[0] = 'W'; 
What will be the value of s variable?
In JavaScript Values are immutable; variables are not; they hold a reference to their (primitive) values. The three primitive types string, number and boolean have corresponding types whose instances are objects: String, Number, Boolean.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes