This commit is contained in:
2024-06-02 12:22:16 +02:00
parent b8e26c7703
commit e9d6b3ad15
5 changed files with 66 additions and 0 deletions

23
4.1object/t4.js Normal file
View 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;
}
}
}