in javascript check is is an array or not

JavaScript
Array.isArray(yourItem)
Source

Also in JavaScript: