-
-
Save TheShubhamVsnv/ecc76bef0355a3a0522deb4195dbf478 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let uniqueColors = new Set(["red", "blue", "green"]); | |
uniqueColors.forEach(color => console.log(color)); // Display each color | |
let allColors = [...uniqueColors.keys()]; // Get all unique colors | |
let allColorValues = [...uniqueColors.values()]; // Get all unique color values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment