3 ms·
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 wo
by kjensen 10y ago
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.