Question 2
Back to Exercise
JavaScript refuses to run the code below. Which statement correctly describes the problem?
const salary = 12_00_000_;
console.log(salary);
- A It prints 1200000
- B It prints 12_00_000
- C SyntaxError: a numeric separator (_) cannot end a number Correct
- D ReferenceError: _ is not defined
Correct Answer: Option C
Underscores may appear only between digits (12_00_000 is fine and equals 1200000). A trailing, leading or doubled separator is a SyntaxError.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!