mardi 19 mai 2015

Uncaught SyntaxError: Unexpected token else, completely stumped

if (monthsResult2 === 1) {
    monthsAppend = "month";
} else if (monthsResult2 > 1)
    monthsAppend = "months";
} else {
    monthsAppend = " ";           
}  

Can anyone tell me what the issue with the if/else statement is? I am currently getting the error:

Uncaught SyntaxError: Unexpected token else

But after looking at multiple examples I can't for the life of me see what I am doing wrong! Any help would be greatly appreciated!

Aucun commentaire:

Enregistrer un commentaire