3 ms·
How about this: let attribute1, attribute2; try { ({attribute1, attribute2} = getObject()) } catch (e) {}
by decentralised 7y ago
How about this:
let attribute1, attribute2;
try {
({attribute1, attribute2} = getObject())
} catch (e) {}
- madacol 7y agowow, didn't know that! So parenthesis are the trick, thanks!
- decentralised 7y agoNo problem!