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

They're not equivalent if doSomething might throw and you don't want to catch it.



Right, which goes back to the question shtylman asked about why doSomething couldn't be part of the try block. I'm tossing this form out there in case it helps. People sometimes forget that await can go wherever an expression goes.




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

Search: