In this article, we are going to learn why we should use Array.some instead of Array.forEach (or) for loop. Objective In a given array, find if the student failed in any one of the subjects. The pass criteria for students is to score at least 40 ma...

Markdown supported Β· ββ΅ to post
Sujeet Agrahari
Building efficient backend systems, one move at a time!
As
Array.some()will check if student failed in at least one subject, there isArray.every()which will check if he failed in all the subjects. BTW, Nice article.π