-
-
Save TheShubhamVsnv/0b3f24d1165b1c8685752150cbb79432 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 userPreferences = new Map(); | |
userPreferences.set("theme", "dark"); | |
userPreferences.set("notifications", "enabled"); | |
userPreferences.forEach((value, key) => console.log(key, value)); // Display key-value pairs | |
let allKeys = [...userPreferences.keys()]; // Get all preference keys | |
let allValues = [...userPreferences.values()]; // Get all preference values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment