Javascript Every() Function

The every() function of array object tests whether all elements in the array pass the test implemented by the provided function. Use it for example to test if all values within an array is greater than 0.

Syntax

Javascript Every() Function Example1

This will produce following result

Javascript Every() Function Example2

This will produce following result