Javatpoint Logo
Javatpoint Logo

JavaScript Set values() method

The JavaScript Set values() method returns an object of new Set iterator. This object contains the value for each element. It maintains an insertion order.

Syntax

The values() method is represented by the following syntax:

Return

A new object of set iterator.

JavaScript Set values() method example

Here, we will understand values() method through various examples.

Example 1

Let's see a simple example of values() method.

Test it Now

Output:

jQuery
AngularJS
Bootstrap

Example 2

Let's see the same example using for loop.

Test it Now

Output:

jQuery
AngularJS
Bootstrap

Next TopicJavaScript Set





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA