JavaScript · Junior · Question 56 of 75
What is the difference between some and every?
- ✓Correct answer:
someis true if at least one element matches;everyis true only if all elements match - 2They are synonyms
- 3
everyreturns the matching elements
Explanation
Both stop as soon as the result is known. On an empty array some returns false and every returns true.