how to check array data type in javascript code example
Example 1: js test if array
if(Array.isArray(myVarToTest)) {
// myVatToTest is an array
} else {
// myVarToTest is not an array
}
Example 2: in javascript check is is an array or not
Array.isArray(yourItem)