Which of the following is used to write output to the command line in Node.js?
A) console.read()
B) console.write()
C) process.stdin
D) console.log()
Answer: D
Explanation: console.log() is used to write output to the command line in Node.js.