Last active
April 3, 2018 12:15
-
-
Save indongyoo/687926acfe994310845b396893498fdd 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
// Iterator 2 | |
console.log( | |
map( | |
([key, val]) => [key.toUpperCase(), val + 1], | |
new Map([['a', 1], ['b', 2]]).entries()) | |
); | |
// [["A", 2], ["B", 3]] | |
console.log( | |
new Map(map( | |
([key, val]) => [key.toUpperCase(), val + 1], | |
new Map([['c', 3], ['d', 4]]).entries())) | |
); | |
// Map(2) {"C" => 4, "D" => 5} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment