Browsing through http://microjs.com, I see lots of libraries labelled \"event emitters\". I like to think I know my way around the basics of the Javascript language pretty
Consider a call-back function-
function test(int a, function(){
console.log("I am call-back function");
}){
console.log("I am a parent function");
}
Now, whenever the parent function is called on an event(a button click or any connection etc) , it first executes its code, and then control is passed to the call-back function. Now, an event emitter is an object/method which triggers an event as soon as some action takes place so as to pass the cntrol to the parent function. For-example- Server is an event emitter in Node.Js programming. It emits event of error as soon as the server encounters an error which passes the control to error parent function. Server emits an event of connection as soon as a socket gets connected to server, this event then triggers the parent function of getConnections, which indeed also takes a call-back function as argument. So, it indeed is a chain, which is triggered as something happens by event emitter which emits an event to start a function running.