-
Notifications
You must be signed in to change notification settings - Fork 5
some
Subhajit Sahu edited this page May 19, 2020
·
16 revisions
Checks if any value satisfies a test. 🏃 📼 📦 🌔 📒
Similar: [some], [every].
array.some(x, fn, [ths]);
// x: an array
// fn: test function (v, i ,x)
// ths: this argument
const array = require('extra-array');
var x = [1, 2, -3, -4];
array.some(x, v => v > 10);
// false
array.some(x, v => v < 0);
// true