Hacker News new | past | comments | ask | show | jobs | submit login

> .then() does not create a new promise

The docs for Promise say that then() returns a promise. Are you saying it returns the original promise (ie. this)?

> But if your call to then isn't a Promise or a function that returns a Promise, your chain ends.

I don't think this is correct. The docs show examples of chains of then() calls where the intermediate function isn't returning a promise. See "chaining": https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: