From 151cf19301250e90e907f17e7ca9a6cd0e235abf Mon Sep 17 00:00:00 2001 From: abutalha00 <75663808+abutalha00@users.noreply.github.com> Date: Sat, 29 Mar 2025 00:37:09 +0200 Subject: [PATCH] Update solution.md solution is empty --- .../01-object/8-multiply-numeric/solution.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/1-js/04-object-basics/01-object/8-multiply-numeric/solution.md b/1-js/04-object-basics/01-object/8-multiply-numeric/solution.md index e69de29bb2..93500232d3 100644 --- a/1-js/04-object-basics/01-object/8-multiply-numeric/solution.md +++ b/1-js/04-object-basics/01-object/8-multiply-numeric/solution.md @@ -0,0 +1,15 @@ +// multiply all object numbers with 2 +let menu = { + width: 200, + height: 300, + title: "My menu", +}; + +function multiplyNumeric(obj) { + for (key in obj) { + if (typeof obj[key] === "number") menu[key] = menu[key] * 2; + } + + console.log(menu) +} +multiplyNumeric(menu);