Events (Core module of node js) – https://nodejs.org/api/events.html
First we need to require the
Now we can do something for clicking any element.
event module will help us to use click and different events. We can now create custom events also!
For using the custom event first we’ll
const myEmitter = new events() and get new events on myEmitter
Second step is making a new custom event which is called
customEvent in this occassion
Then finally we need make this event happens using
So do you understand a bit of EventEmitter right now ?