Looked like a fun article but I decided to test his example for #7.
I used node 4.2.4, with strict mode and I fixed what I believe was a typo on line 16 (I added the parenthesis to invoke this.greet). It printed the greeting as you might naively expect, so I'm not sure what point he's trying to make here.
Not a typo, he wants to pass a function to the promise. By adding the brackets you are invoking the greet function and passing the return value. Of course it works, you are calling it in the context of the original object. You made his point for him.
3 comments
[ 2.1 ms ] story [ 12.2 ms ] threadI used node 4.2.4, with strict mode and I fixed what I believe was a typo on line 16 (I added the parenthesis to invoke this.greet). It printed the greeting as you might naively expect, so I'm not sure what point he's trying to make here.