Skip to content
Subhajit Sahu edited this page Jun 20, 2020 · 16 revisions

Checks if any value satisfies a test. 🏃 📼 📦 🌔 📒

Similar: some, every.

array.some(x, [ft]);
// x:  an array
// ft: test function (v, i, x)
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

references

Clone this wiki locally