how to check if something is array javascript

JavaScript
function isArray(value) {
    return Object.prototype.toString.call(value) === "[object Array]";
}Array.isArray(variableName)var fruits = ["Banana", "Orange", "Apple", "Mango"];

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

Also in JavaScript: