Skip to content

Instantly share code, notes, and snippets.

@kironroy
Last active June 28, 2023 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kironroy/ad388b46a7edbbde4855485f5bc77d08 to your computer and use it in GitHub Desktop.
Save kironroy/ad388b46a7edbbde4855485f5bc77d08 to your computer and use it in GitHub Desktop.
includes/some
const movements3 = [200, 450, -400, 3000, -650, -130, 70, 1300];
console.log(movements3);
// equality
console.log(movements3.includes(-130));
// some condition
const anyDeposits = movements3.some(mov => mov > 1500);
console.log(anyDeposits);
// every
console.log(movements3.every(mov => mov > -990));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment