Event Emitter Lab

Medium
0.0% Acceptance

In this lab, you will create a simple event-driven program using Node.js EventEmitter class. You need to implement an event emitter that emits a custom event with a message after a given delay. This lab will help you understand the EventEmitter class and how to use it to build event-driven applications.

You will perform the following tasks in this lab:

  1. Implement a class extending EventEmitter.
  2. Implement a method that emits a custom event after a given delay.
  3. Implement a listener that listens for the custom event and logs the message.
  4. Export the instance of the class.
  5. Export the listener function.