Answers for "unexpected token javascript"

0

unexpected token javascript

/* A specific language construct was expected, but something else was provided. 
This might be a simple typo. In simple words you put the wrong expression.
Lets say you put a "," in for loop */
for (let i = 0; i < 5,; ++i) { // "," is the problem
  console.log(i);
} // SyntaxError: expected expression, got ')'
for (let i = 0; i < 5; ++i) {
  console.log(i);
} // Correct Answer.
Posted by: Guest on August-17-2021

Code answers related to "unexpected token javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language