Javatpoint Logo
Javatpoint Logo

JavaScript Array every() method

The JavaScript array every() method checks whether all the given elements in an array are satisfying the provided condition. It returns true when each given array element satisfying the condition otherwise false.


The every() method is represented by the following syntax:


callback - It represents the function that test the condition.

currentvalue - The current element of array.

index - It is optional. The index of current element.

arr - It is optional. The array on which every() operated.

thisArg - It is optional. The value to use as this while executing callback.


A Boolean value.

JavaScript Array every() method example

Let's see some examples of every() method.

Example 1

Let's check the marks of a student.

Test it Now



Example 2

In this example, we will test whether the number of elements present in an array are satisfying the specified value.

Test it Now


true false

Next TopicJavaScript Array

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA