Comment

Comment by theprotocol

Is the main addition here the scoping of the awaited response? Am I missing something else?

In ES6+ `try/catch` already offers similar scoping, albeit without the destructuring of the result being a part of the syntax (you declare the response, preferably as a `const`, at the top of the try/catch block).

parent theprotocol 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton