iterator.some(callback) walks each value and asks: does this one pass the test? If any value passes, the result is true right away. If every value fails, the result is false.
The method consumes the iterator. After a match (or after the end), the iterator is closed. An empty iterator returns false, because nothing passed the test.
Remember
iterator.some(callback)
one truthy callback → true (stops early)
all falsy / empty → false
Consumes the iterator (it is closed after the call).
Callback gets (value, index).
Opposite idea of every().
Syntax
Call it on an iterator and pass a function that returns true for a value you care about.
Required. A function called for each value until a match is found. Return a truthy value to succeed, or a falsy value to keep looking. It receives value and index (starting at 0).
Return Value
Return Value
Description
boolean
true as soon as one value passes the test. false if the iterator ends with no match (including when it was empty). The iterator is closed either way.
JavaScript Examples
Example 1 — Check Whether Any Value Passes
Ask if any number from 1 through 5 is greater than 4.
The Try It page first checks that iterator.some() exists, because Iterator helpers are still new. In an older browser it prints a short explanation and the output above. In a current browser it runs the code for real.
How It Works
Make an iterator.[1, 2, 3, 4, 5].values() yields each number.
Test until a hit. 1–4 fail n > 4; 5 passes.
Result is true.some() stops at the first success and closes the iterator.
Example 2 — See false When Nothing Passes
Search for an even number in a list of odd numbers.
The Try It page first checks that iterator.some() exists, because Iterator helpers are still new. In an older browser it prints a short explanation and the output above. In a current browser it runs the code for real.
How It Works
Test each value. 1, 3, and 5 are all odd.
No success. The callback never returns a truthy result.
Result is false. When the iterator ends without a hit, some() returns false.
Example 3 — Use Value and Index Together
Return true when any value equals ten times its 1-based position.
JavaScript
const nums = [10, 25, 30].values();
const ok = nums.some((n, i) => n === (i + 1) * 10);
console.log("Any match: " + ok);
The Try It page first checks that iterator.some() exists, because Iterator helpers are still new. In an older browser it prints a short explanation and the output above. In a current browser it runs the code for real.
How It Works
Two arguments. The callback receives n (value) and i (index from 0).
First value matches. At index 0, 10 === 1 * 10 is true.
Result is true.some() stops at that success and does not need the later values.
Compatibility
Browser & Runtime Support
Iterator.prototype.some() is an Iterator helper (Baseline Newly available since March 2025). It works in current browsers and in Node.js 22 or newer.
✓ Baseline 2025 · Newly available
iterator.some()
Supported in Chrome 122+, Edge 122+, Firefox 131+, Safari 18.4+, Opera 108+ and Node.js 22+. Internet Explorer never got it.
2025Standard since
Google Chrome122+ · Desktop & Mobile
Full support
Microsoft Edge122+ · Chromium based
Full support
Mozilla Firefox131+ · Desktop & Mobile
Full support
Apple Safari18.4+ · macOS & iOS
Full support
Opera108+ · Chromium based
Full support
Samsung Internet26+ · Android
Supported
Android WebView122+ · Chromium based
Supported
Node.js22+ · Server runtime
Supported
DenoRecent versions · JavaScript runtime
Supported
BunRecent versions · JavaScript runtime
Supported
Internet ExplorerNo native support
Not supported
iterator.some()Current browsers
Bottom line: Check support with a typeof test before you use it in older browsers. Prefer chaining helpers and calling toArray() last.
Frequently Asked Questions
It returns true if at least one value from the iterator passes your test function. If none pass, it returns false. The iterator is consumed.
some() needs one success. every() needs every value to succeed. An empty iterator makes some() false and every() true.
Yes. As soon as the callback returns a truthy value, some() returns true and closes the iterator. Remaining values are not read.
No. some() closes the iterator whether it found a match or not. Create a new iterator if you need another pass.
The idea matches Array.prototype.some(), but it runs on an iterator helper. Feature-detect support in older browsers before you rely on it.