We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Finds value passing a test, from right. 🏃 📼 📦 🌔 📒
Alternatives: find, findRight. Similar: find, findIndex.
iterable.findRight(x, fn); // x: an iterable // fn: test function (v, i, x)
const iterable = require('extra-iterable'); var x = [1, 2, 3, 4, 5]; iterable.findRight(x, v => v % 2 == 0); // 4 ^ iterable.findRight(x, v => v % 2 == 1); // 5 ^