JS Basic Tutorial
ES6 introduced powerful array iteration methods that make working with arrays simpler, cleaner, and more readable. These helper methods iterate over arrays and apply functions to their elements.
Executes a provided function once for each array element. It does not return anything.
Try it yourself
Creates a new array by applying a function to each element of the original array. It returns the transformed array.
Try it yourself
Returns the first element in the array that satisfies a specified condition. If no element matches, it returns undefined
.
Try it yourself
Returns the index of the first element that satisfies a specified condition. If no element matches, it returns -1
.
Try it yourself
Creates a new array containing elements that pass a specified condition (filter function). It returns the filtered array.
Try it yourself
Executes a reducer function on each element of the array, resulting in a single output value.
Try it yourself
Checks if at least one element in the array satisfies a specified condition. Returns true
or false
.
Try it yourself
Checks if all elements in the array satisfy a specified condition. Returns true
or false
.
Try it yourself