Skip to content

Commit 95af86c

Browse files
authored
Update solution.md
I've added the solution here because the reader is obliged to go to the sandbox to see the solution, which has not happened till now in the course. And even there's already a link for doing that just above.
1 parent e6b28a3 commit 95af86c

File tree

1 file changed

+19
-0
lines changed
  • 1-js/04-object-basics/01-object/8-multiply-numeric

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
``` js run
2+
3+
// before the call
4+
let menu = {
5+
width: 200,
6+
height: 300,
7+
title: "My menu"
8+
};
9+
10+
function multiplyNumeric(obj) {
11+
for (let key in obj) {
12+
if (typeof obj[key] == 'number') {
13+
obj[key] *= 2;
14+
}
15+
}
16+
}
17+
18+
alert(menu);
19+
```

0 commit comments

Comments
 (0)