IsArray function for Javascript

This snippet will give you the IsArray function for Javascript.

Sample Javascript

Object.prototype.IsArray = function() {
   return this.constructor == Array;
}

Please Share us:
Please rate this snippet

2 thoughts on “IsArray function for Javascript

Leave a Reply