10 questions · Node.js · beginner level
What does this output?
const EventEmitter = require("events")
const emitter = new EventEmitter()
emitter.on("greet", (name) => {
console.log("Hello,", name)
})
emitter.emit("greet", "Rahul")What is the difference between .on() and .once()?
An uncaught exception in Node.js will crash the entire process.