in javascript check is is an array or not

JavaScript
Array.isArray(yourItem)var fruits = ["Banana", "Orange", "Apple", "Mango"];

var n = fruits.includes("Mango");
 
Source

Also in JavaScript: