W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
7 questions for “Events & EventEmitter”
Found in 1 field. Select a question to see its full answer.
Matching topics
Node.js
Events
&
EventEmitter
5
Information Technology
7 questions in 1 technology
#
Question
Technology
Topic
Level
1
How do you create a custom class that emits
events
by extending Node's built-in
EventEmitter
?
Node.js › Events & EventEmitter
Node.js
Events
&
EventEmitter
Beginner
2
How does the 'once' method differ from 'on' when subscribing to an
EventEmitter
's
events
, and when would you use it?
Node.js › Events & EventEmitter
Node.js
Events
&
EventEmitter
Intermediate
3
What happens when an
EventEmitter
emits an event that has an 'error' listener versus one that doesn't?
Node.js › Events & EventEmitter
Node.js
Events
&
EventEmitter
Intermediate
4
What is the default maximum listener limit on an
EventEmitter
, and why does Node.js warn when it's exceeded?
Node.js › Events & EventEmitter
Node.js
Events
&
EventEmitter
Advanced
5
How would you implement a custom event that carries multiple pieces of data, and what's the convention for structuring the emitted payload?
Node.js › Events & EventEmitter
Node.js
Events
&
EventEmitter
Advanced
6
What does the node:
events
module's
EventEmitter
class provide, and what naming convention do most Node.js core APIs follow when using it?
Node.js › Core Node.js Modules
Node.js
Core Node.js Modules
Beginner
7
What is the Observer pattern, and how does Node.js's
EventEmitter
class implement it natively?
Node.js › Architecture & Design Patterns
Node.js
Architecture & Design Patterns
Advanced