Skip to content

Commit

Permalink
chore: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
manthanank authored Oct 7, 2024
1 parent bed1712 commit d3ceee0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3259,13 +3259,15 @@ letters.has("a");
```javascript
// Create a Set
const letters = new Set(["a","b","c"]);
const letters = new Set(["a", "b", "c"]);

// List all Elements
let text = "";
letters.forEach (function(value) {
text += value;
})
letters.forEach(function(value) {
text += value + " ";
});

console.log(text.trim()); // Output: "a b c"
```
**values** - Returns an iterator with all the values in a Set
Expand Down

0 comments on commit d3ceee0

Please sign in to comment.