Question 1
Back to Exercise
What does the following JavaScript code print (console output, as in Node.js)?
console.log("Sum:", 2 + 3, "done");
- A Sum:5done
- B Sum: 5 done Correct
- C Sum: 2 + 3 done
- D Sum:,5,done
Correct Answer: Option B
The expression 2 + 3 is evaluated first, and console.log separates its arguments with one space.
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!