+ 5

Explain the if-else statements to me.

2nd Jun 2017, 5:41 AM
Anurag Tomar
2 odpowiedzi
+ 11
var a=5; if(a==5){ document.write(a);} else{ document.write("a"); } if condition is true ,output is 5 if condition is false, output is a
2nd Jun 2017, 5:53 AM
Vismay Katharani
Vismay Katharani - avatar
+ 1
if condition a is true, the output is 5 why if the condition is false it will process a as output
18th Jun 2017, 2:50 AM
Showumi Idris Jibola
Showumi Idris Jibola - avatar