JavaScript Array some() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Array

Definition

Array.prototype.some(callback) asks: does at least one element pass this test? It returns true or false, stops early on the first match, and does not mutate the array. Need every element to pass? Use every().

Remember
array.some(callback)

callback(element, index, array) → truthy / falsy

any pass  → true  (stops early)
none pass → false
empty []  → false

some  = ANY pass?
every = ALL pass?

Syntax

Call array.some. Start with this line.

JavaScript
array.some(callback)
CallWhat it does
array.some(callback)Primary signature.
array.some(...)Call with the arguments your case needs.

Built into JavaScript. Call some(...) on an array instance — no import required.

Library declarations
JavaScript
array.some(callback)

Parameters

ParameterDescription
ArrayRequired. Values to test (read-only)
callbackRequired. Returns truthy if this element “passes”
thisArgOptional. Value for this inside the callback

Return Value

Return ValueDescription
*true or false

JavaScript Examples

Example 1 — At Least One Element Passes

Check if any number is greater than 30.

JavaScript
const numbers = [10, 20, 30, 40, 50];

const hasAbove30 = numbers.some((num) => num > 30);

console.log(hasAbove30);
// true
Try It Yourself

How It Works

  1. Walk left to right. Test each number with num > 30.
  2. Early misses. 10, 20, and 30 fail the test.
  3. First hit. 40 passes → some returns true immediately.
  4. Skip the rest. 50 is never checked (short-circuit).

Example 2 — Returns false When None Match

If every callback result is falsy, the answer is false.

JavaScript
const numbers = [10, 20, 30, 40, 50];

const hasAbove100 = numbers.some((num) => num > 100);

console.log(hasAbove100);
// false
Try It Yourself

How It Works

  1. Same array, harder test. Ask whether any value is greater than 100.
  2. No early exit. Every element is checked because none pass.
  3. Final answer. With zero successes, some returns false.
  4. Array untouched. numbers is still [10, 20, 30, 40, 50].

Example 3 — some() vs every()

Same scores, different questions: any fail vs all pass.

JavaScript
const scores = [80, 92, 76, 88];

const anyFail = scores.some((s) => s < 70);
const allPass = scores.every((s) => s >= 70);

console.log("any below 70?", anyFail);
// false
console.log("all at least 70?", allPass);
// true
Try It Yourself

How It Works

  1. some asks “any?” Look for one score below 70 — none exist → false.
  2. every asks “all?” Require every score ≥ 70 — all four pass → true.
  3. Same data, opposite lenses. Pick the method that matches the question.
  4. Rule of thumb. Existence check → some; universal check → every.

Browser & Runtime Support

Array.prototype.some() has been available since ES5 (2009), alongside every, filter, and map.

✓ Baseline · ES5

Array.prototype.some()

Supported in Chrome, Firefox, Safari, Edge, IE 9+, and all modern Node.js versions.

99% Near-universal support
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
Array.some() Excellent

Bottom line: Safe for modern and legacy IE9+ projects. No polyfill needed for current browsers and Node LTS.

Frequently Asked Questions

some() tests whether at least one element in an array passes a callback function. It returns true if any callback return is truthy; otherwise it returns false.
No. some() only reads elements through your callback. It does not change the array unless your callback mutates it deliberately (which is discouraged).
An empty array always returns false. There are no elements that can pass the test.
Yes. some() short-circuits—it stops calling the callback as soon as one element returns a truthy value and immediately returns true.
some() asks 'does ANY pass?' and returns true on the first success. every() asks 'do ALL pass?' and returns false on the first failure.
some() has been available since ES5 (2009). It works in all modern browsers, Node.js, and Internet Explorer 9+.

Next: sort()

Learn how to reorder array elements with a compare function.

sort() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful