Skip to content
Advertisement

Why am I getting Syntaxerror for this while loop? [closed]

I was working on my code and I got error for this else statement:

JavaScript

But once I removed it the append statement is getting the error. (Actually by pattern, the line of code that lie in that line-18 is getting a Syntaxerror. Even after skipping that line I’m getting the same error in the next line).

Full code:

JavaScript

This is happening irrespective of ide. So what causes this problem.

Advertisement

Answer

This line has a non-matched opened parenthesis.

JavaScript

You’ll need to remove it or put a closing one where you need it

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement