0

i dont know what im doing wrong

<html> <head></head> <body> <script> var a = 1; var b= 2; while (a>1){ ++a } else(a+b) break; if else (a+a+a) break; </script> </body> </html>

6th Mar 2019, 7:24 AM
Gregorio Faerman
Gregorio Faerman - avatar
4 ответов
+ 1
First of all, while (a>1){ ++a } your initial value of a is 1 . As a result, will not go inside while (a>1 => 1>1) Moreover you cannot use 'else' if there is no the corresponding if.
6th Mar 2019, 2:44 PM
Prokopios Poulimenos
Prokopios Poulimenos - avatar
0
There are a lot of errors on your code. First of all what do you want to do ?
6th Mar 2019, 9:05 AM
Prokopios Poulimenos
Prokopios Poulimenos - avatar
0
execute else (a+b)
6th Mar 2019, 12:51 PM
Gregorio Faerman
Gregorio Faerman - avatar
0
Prokopios Poulimenos when I put var a= 3 it continues with errors
6th Mar 2019, 5:28 PM
Gregorio Faerman
Gregorio Faerman - avatar