diff --git "a/\347\216\213\350\264\265\346\264\213/jisuan.js" "b/\347\216\213\350\264\265\346\264\213/jisuan.js" new file mode 100644 index 0000000000000000000000000000000000000000..c73cfdebd7e2c013c98a7cc3ce64a7962e8f15b1 --- /dev/null +++ "b/\347\216\213\350\264\265\346\264\213/jisuan.js" @@ -0,0 +1,17 @@ +var a=a; +var b=7; +let jisuanqi={ + jia:function(){ + return a+b; + }, + jian:function(){ + return a-b; + }, + cheng:function(){ + return a*b; + }, + chu:function(){ + return a/b; + } + }; +module.exports=jisuanqi; \ No newline at end of file diff --git "a/\347\216\213\350\264\265\346\264\213/use.js" "b/\347\216\213\350\264\265\346\264\213/use.js" new file mode 100644 index 0000000000000000000000000000000000000000..5f12da0d3aeedfb76b91d1f835a21dc6276f1458 --- /dev/null +++ "b/\347\216\213\350\264\265\346\264\213/use.js" @@ -0,0 +1,5 @@ +let obj=require('./jisuan'); +console.log('加法:'+obj.jia()); +console.log('减法:'+obj.jian()); +console.log('乘法:'+obj.cheng()); +console.log('除法:'+obj.chu()); \ No newline at end of file