-
-
Save yschen25/c6c6f95008d526b12e891c2ab9da5457 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
for (let i = 0; i < arrLength; i++) { | |
if (map.has(arr[i])) { | |
map.set(arr[i], map.get(arr[i]) + 1); | |
} else { | |
map.set(arr[i], 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment