5 Program to demonstrate Event Emitter in NodeJS Atharva Satyendra Agrawal August 11, 2020 Atharva Satyendra Agrawal Program: var events = require('events'); var emitter = new events.EventEmitter(); emitter.on('publishVideo', function(message){ console.log(message); }); emitter.emit('publishVideo',"CodingAtharva has uploaded a new Video"); Output: Tweet Share Share Share Related Post