DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Interview Prep Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
medium
Interview Prep
Why must an event emitter's `emit` method iterate over a COPY of the handler array rather than the live array?
A
Copying is required by JavaScript syntax rules
B
So a handler calling off() on itself or another handler mid-emit doesn't corrupt the in-progress iteration (skip or double-invoke handlers)
C
It has no real effect, it's just a style preference
D
Copies run faster than live arrays in all cases
Check Answer