Node.js · Junior · Question 40 of 75
What is an EventEmitter?
- ✓Correct answer: A class that lets objects emit named events and lets other code subscribe with
on() - 2A browser API for DOM events
- 3A tool that sends emails
Explanation
Many Node.js objects are EventEmitters: HTTP servers, streams and process. Subscribe with on or once and fire events with emit.