added explanations, closes #798
This commit is contained in:
parent
5bca8a5ee2
commit
594cc4a6d6
1 changed files with 1 additions and 0 deletions
|
@ -159,6 +159,7 @@ The iteration goes in the same order as the values were inserted. `Map` preserve
|
|||
Besides that, `Map` has a built-in `forEach` method, similar to `Array`:
|
||||
|
||||
```js
|
||||
// runs the function for each (key, value) pair
|
||||
recipeMap.forEach( (value, key, map) => {
|
||||
alert(`${key}: ${value}`); // cucumber: 500 etc
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue