Javascript Array contains(needle)

Description

Javascript Array contains(needle)


'use strict';/* w  ww  .  j  av a  2  s .  com*/

Array.prototype.contains = function(needle) {
  return this.indexOf(needle) !== -1;
};



PreviousNext

Related