Event Driven Applications - martinbalke-401-adavanced-js/seattle-javascript-401n14 GitHub Wiki

Event Driven Applications

Event's function much the same way inside of the Node ecosystem as the do inside of native javascript. Using the event emitter package you are able to attach events to specific areas of your code. If you would like a pop up to execute on a click event then you would simply write .on('click', popupFunction). It is considered best practice to name and declare your event functions before you use them inside of an event due to the way that event-emitter handles removing events.