markberning
1/7/2018 - 10:56 AM

Node.js

/*
Events
In JS you can use callback functions (functions that are passed into another function as an arg) to handle events.
There are 2 types:
User Events: mouse click
System Events: setTimeout( () => {alert("Timer finished"}, 1000 );

System Events in Node.js
Data Events: reading data in from an URL or file
Completion Events: when an action is completed
Error Events: