diff --git "a/\345\220\264\351\207\217/2023.2.14/obj.js" "b/\345\220\264\351\207\217/2023.2.14/obj.js" new file mode 100644 index 0000000000000000000000000000000000000000..595f3984684c540f8cd51882540d15b8c3550f14 --- /dev/null +++ "b/\345\220\264\351\207\217/2023.2.14/obj.js" @@ -0,0 +1,19 @@ +let obj = { + "addition":function(num1,num2){ + return num1+num2; + }, + "subtraction":function(num1,num2){ + return num1-num2; + }, + "multiplication":function(num1,num2){ + return num1*num2; + }, + "division":function(num1,num2){ + return num1/num2; + }, + "go":function(num1,num2){ + console.log(num1+"+"+num2+"="+this.addition(num1,num2)+"\n"+num1+"-"+num2+"="+this.subtraction(num1,num2)+"\n"+num1+"*"+num2+"="+this.multiplication(num1,num2)+"\n"+num1+"/"+num2+"="+this.division(num1,num2)); + } +} + +module.exports = obj; \ No newline at end of file diff --git "a/\345\220\264\351\207\217/2023.2.14/one.js" "b/\345\220\264\351\207\217/2023.2.14/one.js" new file mode 100644 index 0000000000000000000000000000000000000000..7384d3dda16865de5eb45835128b544534fdbb39 --- /dev/null +++ "b/\345\220\264\351\207\217/2023.2.14/one.js" @@ -0,0 +1,3 @@ +let obj = require('./obj.js'); + obj.go(1,2) +