how to know if something is in an array code example
Example 1: js check if array
Array.isArray([1, 2, 3]); // true
Array.isArray('asdf'); // false
Example 2: how to check if something is array javascript
function isArray(value) {
return Object.prototype.toString.call(value) === "[object Array]";
}