FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

some · nodef/extra-array Wiki · GitHub

Subhajit Sahu edited this page May 3, 2023 · 16 revisions

Examine if any value satisfies a test.

Similar: some, every.


function some(x, ft)
// x:  an array
// ft: test function (v, i, x)
const xarray = require('extra-array');

var x = [1, 2, -3, -4];
xarray.some(x, v => v > 10);
// → false

xarray.some(x, v => v < 0);
// → true


References

Wiki pages Pages 196

Clone this wiki locally


Back | FazBrowse Home | New Git URL