Is there a shorthand version of writing something like this:
let parsed;
try {
parsed = JSON.parse(somedata);
} catch (e) {}
someFunction(parsed || {});
I'm thinking more in the lines of this:
const parsed = try JSON.parse(somedata);
someFunction(parsed || {});
Obviously this specific example is super contrived, but I'm curious to know if there is something like it.