Posted By

psradich111 on 09/07/11


Tagged

array in


Versions (?)

is in Array


 / Published in: JavaScript
 

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

Report this snippet  

You need to login to post a comment.