30 Days Of JavaScript

Day 11: Higher Order Functions Part 2

Lesson 3: every

Given what some() does you might be able to guess what every() does.

It tests to see if every item in an array returns true for the function you give it.

So using our car example again, lets see if every car has a top speed above 100 and then above 150.

Again, we get true and then false but this time it's because every element returns true for car.topSpeed > 100 but not every car returns true for car.topSpeed > 150

Outline

Go Pro?

Upgrade to Pro for quizzes, tracked progress and a completion certificate for just $25 🚀

Want more developer tips, tricks and tools?
Then follow me:
FREE Coding Career Quick Start Guide 🚀
Discover the best way to learn to code, how to land a job and valuable resources to help your journey in this free 15 page value packed guide.
Looking to email me? You can get me on my first name at allthecode.co