SyntaxError: missing variable name (Firefox) SyntaxError: Unexpected token = (Chrome)
Cause of Error: There might be a variable missing a name. This is because of syntax errors in the code. Comma might be misplaced somewhere in code.
Example 1: The variable name is missing, So the error has occurred.
SyntaxError: Unexpected token =
Example 2: The comma(, ) is used in place of “;”, So the error has occurred.
SyntaxError: Unexpected token 'var'