+ 1

WHY CAN'T THIS CODE WORK

function myAlert(){ p = prompt("WRITE SOMETHING"); if(p === "") { { alert("ITS BLANK"); } setInterval(myAlert, 3000); } else { alert("OK COOL"); } }

3rd Mar 2019, 9:54 PM
Glory222
Glory222 - avatar
1 Réponse
+ 2
There should be no piece of code between the if and else statement if(condition){ statement }else{ statement }
3rd Mar 2019, 10:01 PM
Ore
Ore - avatar