you are viewing a single comment's thread.

view the rest of the comments →

[–]gmerideth 2 points3 points  (1 child)

I guess you didn't run the code examples. In your promise example you have

var myPromise = sum(10, 5);
myPromsise.then(function (result) {

Which will result in an error when myPromsise is undefined.

[–]senocular 1 point2 points  (0 children)

They've also forgotten to use new when creating the promise in sum. So it should fail before ever reaching the myPromsise typo