Javascript Array includesEveryElement(array)

Description

Javascript Array includesEveryElement(array)


/*// w  w w . jav a2  s.c  om
 * Helper methods extending the Array class
 */
Array.prototype.includesEveryElement = function(array) {
  var array = array;
  return this.every(function(element) {
    return array.includes(element);
  })
};



PreviousNext

Related