Re: Try/Catch always needed for await?

2016-10-17 Thread Jordan Harband
Just because you get a message in your console that you have an unhandled rejection, doesn't mean your program can adapt to that as needed. Relying on that information is a last resort - it's the final safety net for you, the human, if you've failed to .catch all your promises at runtime (in your

Re: Try/Catch always needed for await?

2016-10-17 Thread Jordan Rome
On Sun, Oct 16, 2016 at 9:14 AM, Marky Mark wrote: > But if you dont, your program will never know about the error or do > anything to handle it. Perhaps this is where I'm confused. I'm under the impression that `catch` shouldn't be used anymore than try/catch does when

Re: Power operator, why does -2**3 throws?

2016-10-17 Thread Leo Balter
If -2 ** 2 returned me -4 in JS I would be confused. JS is not a math language, it's a programming language. We have basic math operations on its syntax and that's fine. > In the same vein, you have `pow(1+1, 2) == 4` but `1+1 ** 2 == 2`, because the latter is interpreted as `1+(1 ** 2)`. Where