81
JavaScript Map values() method
The JavaScript map values() method returns an object of new Map iterator. This object contains the value for each element. It maintains insertion order.
Syntax
The values() method is represented by the following syntax:
Parameter
A new object of map iterator.
JavaScript Map values() method example
Here, we will understand values() method through various examples.
Example 1
Let’s see a simple example of values() method.
Output:
jQuery AngularJS Bootstrap
Example 2
Let’s see the same example using for loop.
Output:
jQuery AngularJS Bootstrap
Next TopicJavaScript Map