events.emit code example Example: eventemitter nodejs myEmitter.on('status', (code, msg)=> console.log(`Got ${code} and ${msg}`));