What is the output?
console.log([] + {}, typeof ([] + {}));
- [object Object] string
- [object Object] object
- {} string
- NaN string
Both operands stringify: '' plus '[object Object]', and the result is a string.
Play Problem Solving ▸
console.log([] + {}, typeof ([] + {}));