get type of item in an array javascript code example
Example 1: if typeof equals array javascript
Object.prototype.toString.call(obj) === '[object Array]'
Example 2: if typeof equals array javascript
typeof obj.length === 'number'
Object.prototype.toString.call(obj) === '[object Array]'
typeof obj.length === 'number'