DEV Community

Do Cuong
Do Cuong

Posted on

28/10

28/10
TOP - Foundation: 93%
Object Basics

Done with the two array cardio challenges of Javascript30.
07 - Array Cardio Day 2 was easier than 04 - Array Cardio Day 1 imo.

First time using array.some() and array.every() method.

array.some() check if any of the item in the array satisfy for the condition.
Return true if atleast 1 item passed. If all failed then return false.

array.every() check if all the items in the array satisfy the condition.
Return true if all items passed. return false if even 1 item failed.

Pretty neat.

Tomorrow, I will work with the last part of TOP assignment, which is foundations/object basics exercises.

Top comments (0)