Consider following snippet:
 var s = 'Hello world'; s[0] = 'W'; 
What will be the value of s variable?
Explanation
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.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести