Object Or Array Check in JavaScirpt

Tagged with: , , , ,

Test whether an object is an object or an array


if(Object.prototype.toString.apply(arr) === '[object Array]') alert("Array")

Original Article

One Response to “Object Or Array Check in JavaScirpt

Leave a Reply