JavaScript Array Functions Cheat Sheet Part 3
indexOf()
indexOf() returns the first index at which element can be found.
Syntax
Example
join()
join() returns string by concatenating all elements in array
Syntax
Example
keys()
keys() returns Array Iterator that contains keys for each index
Syntax
Example
lastIndexOf()
lastIndexOf() returns last index at which given element can be found.
Syntax
Example
map()
map() creates a new array with results of the provided function
Syntax
Example
pop()
pop() removes last element from array and returns that element.
Syntax
Example
reduce()
reduce() executes a reducer function, resulting in a single output value.
Syntax
Example
reduceRight()
reduceRight() executes a reducer function from right to left, resulting in single output value
Syntax
Example
Thanks for reading... 👏👏👏
JavaScript Array Functions Cheat Sheet Part 2
0 Comments
If you have any question please ask?