Which of the following is a syntax error?

  • Attempting to modify the value of a constant.
  • Missing parenthesis ending a condition in an if statement.
  • Attempting to call a non-existent function.
  • Attempting to read a value from a variable that we have not previously declared.
Explanation & Hint:

In JavaScript, when using an if statement, the condition must be enclosed in parentheses. If you omit the closing parenthesis, it will result in a syntax error.

For more Questions and Answers:

JavaScript Essentials 1 | JSE1 – Module 6 Test Exam Answers Full Score 100%