Created
May 12, 2024 16:59
-
-
Save TheShubhamVsnv/f79b00419068f20dd8f839d8d06bddb8 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.delete("notifications"); // Disable notifications | |
let hasTheme = userPreferences.has("theme"); // Check if theme is set | |
userPreferences.clear(); // Clear all preferences |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment