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!
6 odpowiedzi
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
+ 1
You are missing couple of colon and curly braces in your code.
0
and what I do so that my J's output come below java text
0
still not working
0
make a paragraph/heading below with an id. Then use document.getElementById("id").innerHTML= variableyoustored the ans.
Edit the html code a bit.
0
copy my code if you can't edit