- 1
Having trouble with a code...
I'm trying to improve on a code I have, but the console says that a block of code I made has a missing parenthesis, though that "missing )" is clearly not missing. Any suggestions?
6 Respostas
+ 1
var x = (13*14) // missing semicolon
var y = (15/5) // missing semicolon
if(x>=y)
{
document.write(x+y) // missing semicolon
}
else(x>y) // else doesn't take a condition
{
alert("How many idiots does it take to get through a bush?");
}{ // What is this block for?
document.write( 1 to figure it out the other 184 to try to run through it!); // The sentence between () needs to be in quotes.
}
+ 3
maybe post your code?
0
The curly braces aren't needed, unless you intended to have an if-else if -else statement instead of an if-else with the document.write() always running after.
- 1
Sure!
- 1
It's the commentary and alert sample
- 1
That was part of a little joke, and thnx!