Javascript Array everySync(callback, thisArg)

Description

Javascript Array everySync(callback, thisArg)


Array.prototype.everySync = async function (callback, thisArg) {
  for (let [index, item] of Object.entries(this)) {
    if (!await callback(item, index, this)) return false
  }//from www .  j  a  v  a 2 s. c om

  return true
}



PreviousNext

Related