Posts tagged with: array-methods
The Array method concat() merges two or more arrays into a single array
The Array method every() is used to check if every value in an array meets a set of conditions.
The Array method filter() is used to filter an array based on a set of conditions.
The Array method indexOf() is used to find if a value is present in an array. It returns the index where the element is found or -1 if it is not found in the array.
The Array method join() concatenates the values in an array into a single string.
The Array method map() creates a new array whose values are obtained by calling a function on each element of the original array.
The Array method pop() removes an element from the end of an array.
The Array method push() adds elements to the end of an array.
The Array methods reduce() and reduceRight() reduce the values in an array to a single value.
The Array method reverse() reverses the order of elements in an array.
The Array method shift() removes an element from the beginning of an array.
The Array method some() is used to check if at least one element in the array meets a set of conditions.
The Array method sort() sorts the elements in an array.
The Array method splice() is used to change an array by removing elements from it and/or adding elements to it.
The Array method unshift() adds elements to the beginning of an array.
The Array method forEach() is used to execute a function for every element in an array. It is also referred to as the forEach loop.