The some() method tests whether at least one of the elements in the array passes the test implemented by the provided function. The result of the some() method is a boolean. Let's see the syntax:- const new = array.some(( v, i, a) => { // ...

Markdown supported · ⌘↵ to post
Ricardo Luz
Senior Software engineer. @udemy Writer, ECMAScript addict, React, NodeJS, coffee enthusiast.
Thanks for sharing this 😀 usually the devs are so addicted in the filter or the map that generally they don't know about the existence of some and every; I like these two because they help to avoid the old for loop in various ways!