23 lines
331 B
JavaScript
23 lines
331 B
JavaScript
|
// before the call
|
||
|
let menu = {
|
||
|
width: 200,
|
||
|
height: 300,
|
||
|
title: "My menu"
|
||
|
};
|
||
|
|
||
|
multiplyNumeric(menu);
|
||
|
|
||
|
// after the call
|
||
|
menu = {
|
||
|
width: 400,
|
||
|
height: 600,
|
||
|
title: "My menu"
|
||
|
};
|
||
|
|
||
|
function multiplyNumeric(menu){
|
||
|
for(prop in menu){
|
||
|
if(typeof menu[prop] == 'number'){
|
||
|
menu[prop] *= 2;
|
||
|
}
|
||
|
}
|
||
|
}
|