+ b; } ! function logSum(a, b) { var sum = add(a, b); setTimeout(function () { console.log(sum); }, 10); } ! logSum(1, 2); logSum(1, 2) add(a, b) a + b Node.js APIs Call stack
{ this.startDoingStuff(); }.bind(this)); } ! var thing = new MyThing(); thing.getReadyForStuff(); ! // thing.startDoingStuff() gets called now, // not before.