Last active
April 6, 2016 21:43
-
-
Save codemilli/c43ccd758bbdfd917c96010a9dec18ba to your computer and use it in GitHub Desktop.
This file contains hidden or 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 map = new Map(); | |
| let obj = {a: 'haha'}; | |
| map.set(obj, 'hihi').set(1, 1).set(1, 2); | |
| console.log('map has 1 => ', map.has(1)); // true | |
| console.log('value of 1 => ', map.get(1)); // 2 | |
| map.delete(1); | |
| console.log('map has 1 => ', map.has(1)); // false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment