Created
August 14, 2017 01:20
-
-
Save wongyouth/f8cd289e7d763ac11494dff2b80d9113 to your computer and use it in GitHub Desktop.
JS Map vs JS Object
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
| 1. Map 没有来自 Object.prototype 的属性,比如: __proto__, toString | |
| 2. Map 中的key可以是任何类型,Object 只能是 String | |
| 3. Map 对象迭代时的顺序与加入时的顺序一致。 | |
| ref: https://ponyfoo.com/articles/es6-maps-in-depth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment