lundi 6 décembre 2021

Cannot declare the "else" statement in Java script Visual Studio Code? [closed]

New to coding and getting errors in basic coding. Following a youtube tutorial for learning but getting the error even after coding the same way as shown in my tutorial video.

var age = prompt ("what is ur age?");

`If ( (age>= 18)   &&   (age<= 35) ); {

var status = "my audience"; console.log (status);} else { var status = "not intrested"; console.log(status); }`

Upon running the program, the error generated is Unexpected token 'else'.

Aucun commentaire:

Enregistrer un commentaire