+ 1

Javascript. Why do I get "false"

Hello! Сan somebody explain me why do I get "false"? var a, b = "sololearn"; document.write(a == b);

28th Mar 2017, 8:27 AM
Skif Mason
Skif Mason - avatar
3 Réponses
+ 17
Because 'a' has no value.
28th Mar 2017, 8:35 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 10
var a, b; a = b = "SoloLearn";
28th Mar 2017, 8:50 AM
RLi17
+ 2
yes, of course, thank you!
28th Mar 2017, 8:38 AM
Skif Mason
Skif Mason - avatar