JavaScript Professional — Medium
Key points
- The 'test' event triggers the handler to log 5 * 2 = 10
- The 'missing' event has no handler, so nothing is output
- The EventEmitter class allows for event handling in JavaScript
Ready to go further?
Related questions
