Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 287 Bytes

File metadata and controls

15 lines (13 loc) · 287 Bytes

// 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);