Posted By

ionutzp on 11/05/10


Tagged

javascript array


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

ionutzp


Check for Array-ness


 / Published in: JavaScript
 

  1. if (typeof Array.isArray === "undefined") {
  2. Array.isArray = function (arg) {
  3. return Object.prototype.toString.call(arg) === "[object Array]";
  4. };
  5. }

Report this snippet  

You need to login to post a comment.