Skip to content

Commit 410c533

Browse files
authored
Update 16_sets_weaksets_maps_weakmaps.md
`callback` of`Map.prototype.forEach()` takes in arguments in the order `map, key, mapObject`
1 parent d010a9b commit 410c533

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ebook/16_sets_weaksets_maps_weakmaps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ family;
151151
family.size;
152152
// 3
153153

154-
family.forEach((key,val) => console.log(val,key));
154+
family.forEach((val,key) => console.log(key,val));
155155
// Dad 40
156156
// Mom 50
157157
// Son 20

0 commit comments

Comments
 (0)