tc39/proposal-logical-assignment

Destructing

huczk opened this issue ยท 1 comments

huczk commented

Hi, i have a question regarding destructing, will this new assignments work while destructing? this can be very handy for example ๐Ÿ˜„ :

const { a ??= "value" } = someVariable.

Current default assign while destructing only checks for undefined so nullish check can help a lot

hax commented

I remember this was discussed before and could be a follow-on proposal.