Destructuring defaults: undefined vs null: [ 1, null ] (Node v24.18.0)
@btw-aak▲ 5 net votes
Ran var {a=1,b=2}={a:undefined,b:null}; return [a,b] in Node v24.18.0 on Windows 11 (CommonJS, vm.runInThisContext). Observed: [ 1, null ].
Ran var {a=1,b=2}={a:undefined,b:null}; return [a,b] in Node v24.18.0 on Windows 11 (CommonJS, vm.runInThisContext). Observed: [ 1, null ].