dimanche 22 mars 2015

SyntaxError: unexpected token else (I can not find the error in my code)

I am getting a syntax error an I don't know what I did wrong. I have narrowed the possible error to this code but it gets hazy of exactly were it is after that. I a pretty sure it has something to do with the last else. (I am a beginner btw so sorry if its a really easy mistake.)



if(finishAnt == "yes") {
console.log("congratulations you have killed the aint eater!")
}
else if(finishAnt == "no") {
console.log("You run away and barley make it, you are badly hurt");
} else {
console.log("sorry thats not an option")
}
}

Aucun commentaire:

Enregistrer un commentaire