3 ms·
That looks like a typo in the example. This code: var {wtf} = NaN; would set wtf to undefined, for the reasons described in the article, since it would end
by bzbarsky 11y ago
That looks like a typo in the example. This code:
var {wtf} = NaN;
would set wtf to undefined, for the reasons described in the article, since it would end up doing (NaN)["wtf"]. But trying to destructure NaN into an array should throw an exception.