Created
November 13, 2022 20:21
-
-
Save jslnriot/a90fef093061e8bd5fedd025cf2447ea 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
const hashmap = new Map() | |
hashmap.set(1, 'first') | |
hashmap.set(2, 'second') | |
hashmap.set(3, 'third') | |
console.log(' full ... ', hashmap) // Map(3) { 1 => 'first', 2 => 'second', 3 => 'third' } | |
console.log('size ... ', hashmap.size) // returns 3 | |
console.log('.get ... ', hashmap.get(2)) // returns second | |
console.log('.has ... ', hashmap.has(3)) // returns true | |
console.log('.has ... ', hashmap.has(4)) // returns false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment