Created
January 13, 2020 14:40
-
-
Save cesarkohl/4dd30e4abbeee0e3202ca4d3f23594d2 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
| var weakMap = new WeakMap (); | |
| function function () {}; | |
| var object = {}; | |
| // TypeError: Invalid value used as weak map key | |
| weakMap.set ("string", "this is a string"); | |
| weakMap.set (function, "this is a function"); | |
| weakMap.set (object, "this is an object"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment