diff --git "a/why/\346\250\241\345\235\227\344\275\234\344\270\232/demo1.js" "b/why/\346\250\241\345\235\227\344\275\234\344\270\232/demo1.js" new file mode 100644 index 0000000000000000000000000000000000000000..a9d2dd4a5bd1250d7a876636878d12a7c9cd9bb7 --- /dev/null +++ "b/why/\346\250\241\345\235\227\344\275\234\344\270\232/demo1.js" @@ -0,0 +1,15 @@ +let obj ={ + 'jia':function(){ + return("a+b"); + }, + 'jian':function(){ + return('a-b'); + }, + 'cheng':function(){ + return('a*b'); + }, + 'chu':function(){ + return('a/b'); + } +} +module.exports= obj; \ No newline at end of file diff --git "a/why/\346\250\241\345\235\227\344\275\234\344\270\232/demo2.js" "b/why/\346\250\241\345\235\227\344\275\234\344\270\232/demo2.js" new file mode 100644 index 0000000000000000000000000000000000000000..520e0c9665cb5e6c54bbdab9fb381a12745ba188 --- /dev/null +++ "b/why/\346\250\241\345\235\227\344\275\234\344\270\232/demo2.js" @@ -0,0 +1,7 @@ +let obj=require("./demo1.js"); +var a=1 +var b=2 +console.log(obj.jia(a,b)); +console.log(obj.jian(a,b)); +console.log(obj.cheng(a,b)); +console.log(obj.chu(a,b));