0

What can i do so my code can work properly as there is a error is js and my HTML TEXT COMES BELOW MY JS OUTPUT. PLEASE HELP!

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

22nd Apr 2018, 12:34 PM
BHAVIK
BHAVIK - avatar
6 Answers
0
var a = prompt("enter a year"); var b = 4 ; //This one if ( a%4 == 0){ document.write(a +" is a leap year "); }//this one else if( a%4 != 0){ document.write(a + " is not a leap year "); }//this one
22nd Apr 2018, 12:39 PM
Akib
Akib - avatar
+ 1
You are missing couple of colon and curly braces in your code.
22nd Apr 2018, 12:37 PM
Akib
Akib - avatar
0
and what I do so that my J's output come below java text
22nd Apr 2018, 12:38 PM
BHAVIK
BHAVIK - avatar
0
still not working
22nd Apr 2018, 12:44 PM
BHAVIK
BHAVIK - avatar
0
make a paragraph/heading below with an id. Then use document.getElementById("id").innerHTML= variableyoustored the ans. Edit the html code a bit.
22nd Apr 2018, 12:47 PM
Akib
Akib - avatar
0
copy my code if you can't edit
22nd Apr 2018, 1:38 PM
Akib
Akib - avatar