Posted By

iroybot on 07/11/10


Tagged

javascript js inarray


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

iroybot
nerdfiles
dipser


inArray


 / Published in: JavaScript
 

  1. Array.prototype.inArray = function (value) {
  2. var i;
  3. for (i=0; i < this.length; i++) {
  4. if (this[i] === value) {
  5. return true;
  6. }
  7. }
  8. return false;
  9. };

Report this snippet  

You need to login to post a comment.