","text":"it doesn't output false can some one please explain why","answerCount":2,"upvoteCount":2,"suggestedAnswer":[{"@type":"Answer","text":"because you don't write the comparation. You should so something like that\r\n\r\n\r\ndocument.write(x==y);\r\n\r\n//or\r\n\r\nx = (x==y);\r\n\r\nbefore the write.","upvoteCount":7},{"@type":"Answer","text":"you didn't give ; after (x==y) :)","upvoteCount":0}]} }
+ 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 ответов
+ 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