Skip to content

Commit 594cc4a

Browse files
committed
added explanations, closes #798
1 parent 5bca8a5 commit 594cc4a

File tree

1 file changed

+1
-0
lines changed
  • 1-js/05-data-types/07-map-set-weakmap-weakset

1 file changed

+1
-0
lines changed

1-js/05-data-types/07-map-set-weakmap-weakset/article.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ The iteration goes in the same order as the values were inserted. `Map` preserve
159159
Besides that, `Map` has a built-in `forEach` method, similar to `Array`:
160160
161161
```js
162+
// runs the function for each (key, value) pair
162163
recipeMap.forEach( (value, key, map) => {
163164
alert(`${key}: ${value}`); // cucumber: 500 etc
164165
});

0 commit comments

Comments
 (0)