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

Or better, Promise.reject



Both are useful, but I'd hesitate to call it better. What makes you say it is better?


It makes explicit that the intention that a promise should be rejected, as opposed to a throw where one might reasonably expect an exception of some sort.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: