+ 1

Why this javascript code is not working?

https://code.sololearn.com/W21qauJg9Ps8/?ref=app

4th Dec 2020, 11:52 AM
Vinay Jaiswal
Vinay Jaiswal - avatar
4 Answers
+ 2
I understand how to use. thanks guys
4th Dec 2020, 1:09 PM
Vinay Jaiswal
Vinay Jaiswal - avatar
+ 1
Invalid statement. 2 instructions without any relation or separation.... Invalid syntax.. Edit : Correct example : document.write((4 > 2) , (10 < 15)); document.write("<br>", (4 > 2) && (10 < 15)); document.write("<br>", (4 > 2) || (10 < 15));
4th Dec 2020, 12:23 PM
Jayakrishna 🇮🇳
+ 1
Your code was: document.write((4 > 2) ! (10 < 15)); In this code you have puted (!) not operator inside 2 codition. I will give you syntax error because you cant use the (!) operator with this style. I dont know what do you trying to do. But i am giving you an example of correct syntax Example correct syntxes : document.write((4 > 2) && !(10 < 15)); ------------------- document.write((4 > 2) || !(10 < 15));
4th Dec 2020, 1:02 PM
🇧🇩 𝚂𝚊𝚋𝚋𝚒𝚛 𝙷𝚘𝚜𝚜𝚊𝚒𝚗 🇧🇩
🇧🇩 𝚂𝚊𝚋𝚋𝚒𝚛 𝙷𝚘𝚜𝚜𝚊𝚒𝚗 🇧🇩 - avatar
0
what do you want to write?
4th Dec 2020, 11:59 AM
durian
durian - avatar