What is the purpose of some method in arrays

Posted by Jennifer | Updated on

The some() method is used to test whether at least one element in the array passes the test implemented by the provided function. The method returns a boolean value. Let’s take an example to test for any odd elements,


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers