2 ms·
x && !Array.isArray(x) && typeof x === 'object'. its typical to start off with `var &&` to avoid operations on null & undefined values
by Fckd 5y ago
x && !Array.isArray(x) && typeof x === 'object'.
its typical to start off with `var &&` to avoid operations on null & undefined values
- Fckd 5y agoFor environment lacks Array.isArray method i think this works well !!(x && x.__proto__ === [].__proto__)