1.constructor
var fruits = ["Banana", "Orange", "Apple", "Mango"]; var obj={} function isArray(myArray) { return myArray.constructor.toString().indexOf("Array") > -1; } console.log(isArray(fruits)) //true console.log(isArray(obj)) //false
2.Object.prototype.toString
console.log(Object.prototype.toString.call(fruits)); //[object Array]
3.instanceof
console.log(fruits instanceof Array) //true