Skip to content

Instantly share code, notes, and snippets.

@nairihar
Created July 1, 2018 10:07
Show Gist options
  • Save nairihar/619ee9d099ac6e3f0e82b05e91d91f1b to your computer and use it in GitHub Desktop.
Save nairihar/619ee9d099ac6e3f0e82b05e91d91f1b to your computer and use it in GitHub Desktop.
JavaScript series, part 2, Map, medium
const myMap = new Map([[1, 11], [2, 22]]);
myMap.forEach((val, key, map) => {
console.log(val, key, map);
});
// 11, 1, myMap
// 22, 2, myMap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment