as long as there is an object in the array which has specific property values the statement does something

It might be better to define the item your’e referencing, this will help debug and future you when going through the code

let this_is_true = shirts.some(e => e.color === 'blue' && e.size === 'small');

while (this_is_true){
  // ..

  //re-check for every iteration
  this_is_true = shirts.some(e => e.color === 'blue' && e.size === 'small')
}

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top