[Solved] Uncaught SyntaxError: Unexpected token in JS


else block is the problem. Else block should be inside of curly braces if there is more than one line.

6

solved Uncaught SyntaxError: Unexpected token in JS