Their performance characteristics are probably the same, assuming you want to know wether to use find or some in a specific case. They are both lazy in the same way.

The difference is in the output. find will return the value, some will return a boolean.


I checked the source (1.4.4). some and find both use some (=== any) internally. So even if a native implementation of some is used it benefits both find and some.

Answer from Halcyon on Stack Overflow
🌐
Medium
medium.com › poka-techblog › simplify-your-javascript-use-some-and-find-f9fb9826ddfd
Simplify your JavaScript – Use .some() and .find() | by Etienne Talbot | poka-techblog | Medium
September 5, 2019 - As was pointed out in the comments, know that you can also check if every value of the array matches your condition by using .every() . It works exactly like .some(), but will return true only if every occurence match. This array method does exactly what it says: it finds what you’re looking for.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Array › some
Array.prototype.some() - JavaScript | MDN
The some() method of Array instances returns true if it finds an element in the array that satisfies the provided testing function. Otherwise, it returns false.
🌐
LinkedIn
linkedin.com › pulse › understanding-distinction-arraysome-vs-arrayfind-shuaibu-muhammad-20j9f
Understanding the Distinction: Array.some() vs. Array.find() in JavaScript
February 26, 2024 - Array.find() for Specific Values: On the other hand, Array.find() is ideal when you're searching for a particular element in an array based on a condition and need the value of that element.
🌐
Reddit
reddit.com › r/learnjavascript › what is the correct situation to use array.find() vs. array.includes vs. array.some() ?
r/learnjavascript on Reddit: What is the correct situation to use array.find() vs. array.includes vs. array.some() ?
September 14, 2019 -

I understand how each of these methods work, but they all seem to have similar functions to one another, and I'm not sure as to what situation might call for what method.

🌐
Quora
quora.com › What-is-the-correct-situation-to-use-array-find-vs-array-includes-vs-array-some-in-JavaScript
What is the correct situation to use array.find() vs. array.includes vs. array.some() in JavaScript? - Quora
Answer (1 of 2): includes: this is syntactic sugar for the old common way of writing [code]myArray.indexOf('some value') !== -1 [/code]Which can now be written as [code]myArray.includes('some value') [/code]It simply checks to see if some value exists in the array and returns true if it does. ...
🌐
MeasureThat
measurethat.net › Benchmarks › Show › 4337 › 0 › array-find-vs-some
Benchmark: array find vs some - MeasureThat.net
JavaScript benchmarks, JavaScript performance playground. Measure performance accross different browsers. javascript benchmarks online.
🌐
Medium
medium.com › @obsidianart › javascript-array-methods-find-some-and-findindex-explained-6dbd3adbb33e
JavaScript array methods: find, some, and findIndex explained | by Obsidianart | Medium
August 4, 2024 - Well, JavaScript is a language ... easier to read in the future. But if you care about the actual element, you can use find to get the element itself, or undefined if it doesn't exist....
Find elsewhere
🌐
MeasureThat
measurethat.net › Benchmarks › Show › 5921 › 0 › some-vs-find
Benchmark: Some vs Find - MeasureThat.net
JavaScript benchmarks, JavaScript performance playground. Measure performance accross different browsers. javascript benchmarks online.
🌐
LinkedIn
linkedin.com › pulse › java-script-bits-array-methods-some-vs-every-
Java Script Bits - Array Methods - some vs every vs find vs filter
August 12, 2022 - It iterates through the array to find apple, and as soon as it finds one, it returns true or if there is no apple in the array, it returns false. fruitBasket1.some( fruit => console.log(fruit); return fruit === ‘apple’ }) Will output below apple true // final return value fruitBasket3.some( fruit => { console.log(fruit); return fruit === ‘apple’ }) Will output below mango orange orange orange false // final return value
🌐
W3Schools
w3schools.com › jsref › jsref_some.asp
JavaScript Array some() Method
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING INTRO TO HTML & CSS BASH RUST ... Array[ ] Array( ) at() concat() constructor copyWithin() entries() every() fill() filter() find() findIndex() findLast() findLastIndex() flat() flatMap() forEach() from() includes() indexOf() isArray() join() keys() lastIndexOf() length map() of() pop() prototype push() reduce() reduceRight() rest (...) reverse() shift() slice() some() sort() splice() spread (...) toReversed() toSorted() toSpliced() toString() unshift() values() valueOf() with() JS Boolean
🌐
Medium
acharyan.medium.com › javascript-array-fundamentals-find-vs-filter-vs-findindex-vs-some-vs-every-905273dde9fa
Search in Javascript Array : Find Vs Filter Vs FindIndex Vs Some Vs Every | Medium
August 30, 2021 - Use case 3: FindIndex : Use array ‘findIndex’ method to traverse through the array to get an integer result of ‘index number’ when the condition matches for any entity for first time else returns ‘-1’. Loop executes only till the first match. CallbackFn is run even for indexes with unassigned values. ... Use case 4: Some : Use array ‘some’ method to traverse through the array to get a result of boolean true if the condition matches for any entity else returns false.
🌐
Reddit
reddit.com › r/javascript › simplify your javascript – use .some() and .find()
r/javascript on Reddit: Simplify your JavaScript – Use .some() and .find()
September 4, 2019 - Wasn’t aware of some(). Useful function that I’ve been needlessly implementing myself with reduce and/or filter ... It's great. I'm surprised that developers don't just look up the array functions—just once in their life—because there are literally 27 very useful functions in there, plus .copyWithin and .flatMap. ... I looked them all up when I started with JavaScript in 1998.
🌐
Matcha
matcha.fyi › array-methods-javascript
Array Methods: filter, find, map, reduce, every, and some in ...
Please click the circles as they appear · Please verify you're not a robot
🌐
GeeksforGeeks
geeksforgeeks.org › what-is-the-difference-between-every-and-some-methods-in-javascript
What is the difference between every() and some() methods in JavaScript ? | GeeksforGeeks
December 18, 2023 - The Array.every() method in JavaScript is used to check whether all the elements of the array satisfy the given condition or not. The output will be false if even one value does not satisfy the element, else it will return true, and it opposes the some() function.
🌐
CoderPad
coderpad.io › blog › development › javascript-some-method
JavaScript .some() Method: When and How to Use It - CoderPad
June 5, 2023 - The .some() method is built on the same foundation as that of the methods .every() and .find().
🌐
Educative
educative.io › answers › filter-vs-find-javascript-array-methods
filter vs. find: JavaScript array methods
The JavaScript array method find returns the first matching element, while the array method filter returns an array of all matching elements.