a+b
a-b
a/b
a*b
a ^ b a**b
add
minus
divide
multiply
powerof
const calculator = {
add: function(a, b) {
console.log(a+b);
},
minus: function(a, b){
console.log(a-b);
},
divide: function(a, b){
console.log(a/b);
},
multiply: function(a,b ){
console.log(a*b);
},
powerof: function(a, b){
console.log(a**b)
}
};
calculator.add(1,2);
calculator.minus(2,1);
calculator.divide(4,2);
calculator.multiply(5,4);
calculator.powerof(2,10);
2.12 Recap (0) | 2023.08.02 |
---|---|
2.11 Returns (0) | 2023.08.02 |
2.9 Recap (0) | 2023.08.01 |
2.8 Functions part Two (0) | 2023.08.01 |
2.7 Functions part One (0) | 2023.08.01 |
댓글 영역