Created
January 13, 2020 14:38
-
-
Save cesarkohl/fd68ae5a1f177e7d7f3cb7924e526ef3 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 map = new Map (); | |
| mapa.set ('um', 1); | |
| mapa.set ('two', 2); | |
| mapa.set ('three', 3); | |
| for (var key of mapa.keys ()) { | |
| console.log (key); // one two Three | |
| } | |
| for (var value of mapa.values ()) { | |
| console.log (value); // 1 2 3 | |
| } | |
| for (var entry of mapa.entries ()) { | |
| console.log (input); | |
| } | |
| // output: | |
| // ['one', 1] | |
| // ['two', 2] | |
| // ['three', 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment