Please login to start chat

ICT Solutions 22 Oct 2022, 10:15:47
Category : JavaScript Tutorials

JavaScript Array Methods

entries()
    Returns a key/value pair Array Iteration Object

every()
    Checks if every element in an array pass a test in a testing function.

fill()
    Fill the elements in an array with a static value.

filter()
    Creates a new array with all elements that pass the test in a testing function.

find()
    Returns the value of the first element in an array that pass the test in a testing function.

findIndex()
    Returns the index of the first element in an array that pass the test in a testing function.

forEach()
    Calls a function once for each array element.

from()
    Creates an array from an object

includes()
    Determines whether an array includes a certain element.

indexOf()
    Search the array for an element and returns its first index.

isArray()
    Determines whether the passed value is an array.

join()
    Joins all elements of an array into a string.

keys()
    Returns a Array Iteration Object, containing the keys of the original array.

lastIndexOf()
    Search the array for an element, starting at the end, and returns its last index.

map()

    Creates a new array with the results for calling a function for each array element.

pop()

    Removes the last element from an array, and returns that element.

push()
    Adds one or more elements to the end of an array, and returns the array's new length.

reduce()
    Reduce the values of an array to a single value(from left-to-right).

reduceRight()
    Reduce the values of an array to a single value(from right-to-left).

reverse()
    Reverses the order of the elements in an array.

shift()
    Removes the first element from an array, and returns that element.

slice()
    Selects a part of an array, and returns the new array.

some()
    Checks if any of the elements in an array passes the test in a testing function.

sort()
    Sorts the elements of an array.

splice()
    Adds/Removes elements to/from an array.

unshift()
    Adds new elements to the beginning of an array, and returns the arrays's new length.

Comments:

No comment to show.

Available Services
Download Android Application