4.1 done
This commit is contained in:
23
4.1object/t4.js
Normal file
23
4.1object/t4.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user