Write my own small Promise

Having been using promise day to day in Angularjs / Nodejs, but never get a chance to look at the actual implement of it. Today I tried to write a simple version of Promise on my own. It turns out to be pretty interesting. 1st version – Basic classes(Promise and Deferred) First we need some…