Every time you interact with a webpage through itโs user interface, an event is happening. When you click a button a click event is triggered. When you press a key a keydown event is triggered.
EventEmitter
const EventEmitter = require('events').EventEmitter;
>const myEventEmitter = new EventEmitter;
lestin
event.on('-event name-', -call back fun-);
events.emit('-event name-', -call back fun-);