Array values() Method Syntax

arr.values();

JavaScript Array values() Method

JavaScript array.values() is an inbuilt method in JavaScript that is used to return a new array Iterator object that contains the values for each index in the array i.e., it prints all the elements of the array. 

Example:  

Input: A = ['a', 'b', 'c', 'd']
Output: a, b, c, d
Explanation:
Here as we see that input array contain some
elements and in output same elements get printed.

Similar Reads

Array values() Method Syntax

arr.values();...

Array values() Method Return values

It returns a new array iterator object i.e., elements of the given array....

Array values() Method Examples

Example 1: Printing values of array using array values() method...