Question 20
Back to Exercise
What does the following JavaScript code print (console output, as in Node.js)?
const first = "Learn"
const word = first
+ "Frenzy"
console.log(word)
- A Learn
- B SyntaxError
- C LearnFrenzy Correct
- D Learn Frenzy
Correct Answer: Option C
ASI inserts a semicolon only if the next line cannot continue the statement. A line starting with + can, so the two lines form first + "Frenzy".
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!