+ 2

<script> var x = 10; var y = 9; x == y document.write(x); </script>

it doesn't output false can some one please explain why

28th Dec 2016, 10:40 PM
Idowu Shogbon
Idowu Shogbon - avatar
2 odpowiedzi
+ 7
because you don't write the comparation. You should so something like that document.write(x==y); //or x = (x==y); before the write.
28th Dec 2016, 10:51 PM
Nahuel
Nahuel - avatar
0
you didn't give ; after (x==y) :)
29th Dec 2016, 3:08 PM
Saleh Sayeem
Saleh Sayeem - avatar