From 10ebccb1183f4c760f3c5022c41f18da6014f651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=9B=A8=E6=9A=84?= <2322677577@qq.com> Date: Tue, 14 Feb 2023 17:12:15 +0800 Subject: [PATCH 1/5] +-*/ --- ...2\240\345\207\217\344\271\230\351\231\244.js" | 16 ---------------- .../\350\277\220\350\241\214.js" | 8 -------- .../\345\205\250\345\261\200.js" | 6 ++++++ .../\346\250\241\345\235\227.js" | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 24 deletions(-) delete mode 100644 "\346\261\244\344\272\246\345\207\241node\344\275\234\344\270\232/\346\250\241\345\235\227\344\275\234\344\270\232/\345\212\240\345\207\217\344\271\230\351\231\244.js" delete mode 100644 "\346\261\244\344\272\246\345\207\241node\344\275\234\344\270\232/\346\250\241\345\235\227\344\275\234\344\270\232/\350\277\220\350\241\214.js" create mode 100644 "\350\214\203\351\233\250\346\232\204/\345\212\240\345\207\217\344\271\230\351\231\244/\345\205\250\345\261\200.js" create mode 100644 "\350\214\203\351\233\250\346\232\204/\345\212\240\345\207\217\344\271\230\351\231\244/\346\250\241\345\235\227.js" diff --git "a/\346\261\244\344\272\246\345\207\241node\344\275\234\344\270\232/\346\250\241\345\235\227\344\275\234\344\270\232/\345\212\240\345\207\217\344\271\230\351\231\244.js" "b/\346\261\244\344\272\246\345\207\241node\344\275\234\344\270\232/\346\250\241\345\235\227\344\275\234\344\270\232/\345\212\240\345\207\217\344\271\230\351\231\244.js" deleted file mode 100644 index ba307a8..0000000 --- "a/\346\261\244\344\272\246\345\207\241node\344\275\234\344\270\232/\346\250\241\345\235\227\344\275\234\344\270\232/\345\212\240\345\207\217\344\271\230\351\231\244.js" +++ /dev/null @@ -1,16 +0,0 @@ -//作业:写个加减乘除的模块(尽量少写暴露,要考虑复用性),供外部使用. 作业每个分支要建一个目录(自己名字) -let obj={ - 'add':function(num1,num2){ - return num1+num2; - }, - 'sub':function(num1,num2){ - return num1-num2; - }, - 'mul':function(num1,num2){ - return num1*num2; - }, - 'divide':function(num1,num2){ - return num1/num2; - } -}; -module.exports=obj; \ No newline at end of file diff --git "a/\346\261\244\344\272\246\345\207\241node\344\275\234\344\270\232/\346\250\241\345\235\227\344\275\234\344\270\232/\350\277\220\350\241\214.js" "b/\346\261\244\344\272\246\345\207\241node\344\275\234\344\270\232/\346\250\241\345\235\227\344\275\234\344\270\232/\350\277\220\350\241\214.js" deleted file mode 100644 index 618e6f2..0000000 --- "a/\346\261\244\344\272\246\345\207\241node\344\275\234\344\270\232/\346\250\241\345\235\227\344\275\234\344\270\232/\350\277\220\350\241\214.js" +++ /dev/null @@ -1,8 +0,0 @@ -let objs=require("./加减乘除"); -// console.log(objs); -console.log(objs.add(1,2)); -console.log(objs.sub(81,23)); -console.log(objs.mul(6,2)); -console.log(objs.divide(18,3)); - - diff --git "a/\350\214\203\351\233\250\346\232\204/\345\212\240\345\207\217\344\271\230\351\231\244/\345\205\250\345\261\200.js" "b/\350\214\203\351\233\250\346\232\204/\345\212\240\345\207\217\344\271\230\351\231\244/\345\205\250\345\261\200.js" new file mode 100644 index 0000000..5ef9d12 --- /dev/null +++ "b/\350\214\203\351\233\250\346\232\204/\345\212\240\345\207\217\344\271\230\351\231\244/\345\205\250\345\261\200.js" @@ -0,0 +1,6 @@ +let obj = require('./模块'); + +obj.jia(1,1); +obj.jian(2,1); +obj.cheng(5,5); +obj.chu(8,4); \ No newline at end of file diff --git "a/\350\214\203\351\233\250\346\232\204/\345\212\240\345\207\217\344\271\230\351\231\244/\346\250\241\345\235\227.js" "b/\350\214\203\351\233\250\346\232\204/\345\212\240\345\207\217\344\271\230\351\231\244/\346\250\241\345\235\227.js" new file mode 100644 index 0000000..a60e064 --- /dev/null +++ "b/\350\214\203\351\233\250\346\232\204/\345\212\240\345\207\217\344\271\230\351\231\244/\346\250\241\345\235\227.js" @@ -0,0 +1,15 @@ +let mk = { + 'jia':function(a,b){ + console.log(a+b); + }, + 'jian':function(a,b){ + console.log(a-b); + }, + 'cheng':function(a,b){ + console.log(a*b); + }, + 'chu':function(a,b){ + console.log(a/b); + } +} +module.exports=mk; \ No newline at end of file -- Gitee From a888067e4bc2c9c9907988857d217846250bc169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=9B=A8=E6=9A=84?= <2322677577@qq.com> Date: Tue, 14 Feb 2023 17:24:14 +0800 Subject: [PATCH 2/5] 1 --- ...\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" | 1 + 1 file changed, 1 insertion(+) create mode 100644 "\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" diff --git "a/\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" "b/\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" new file mode 100644 index 0000000..56a6051 --- /dev/null +++ "b/\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" @@ -0,0 +1 @@ +1 \ No newline at end of file -- Gitee From 2e25c4b05f5a444beb560e3cc44013bc6d6517df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=9B=A8=E6=9A=84?= <2322677577@qq.com> Date: Tue, 14 Feb 2023 09:27:57 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E8=8C=83=E9=9B=A8=E6=9A=84/=E6=96=B0=E5=BB=BA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" | 1 - 1 file changed, 1 deletion(-) delete mode 100644 "\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" diff --git "a/\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" "b/\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" deleted file mode 100644 index 56a6051..0000000 --- "a/\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file -- Gitee From 4b7002b7b23dce2363c0763a535233bb6ff6a669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=9B=A8=E6=9A=84?= <2322677577@qq.com> Date: Tue, 14 Feb 2023 09:32:07 +0000 Subject: [PATCH 4/5] x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 范雨暄 <2322677577@qq.com> --- ...5\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" diff --git "a/\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" "b/\350\214\203\351\233\250\346\232\204/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" new file mode 100644 index 0000000..e69de29 -- Gitee From 39a307758e90ec0f42e192a687af1b1e219f3eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=9B=A8=E6=9A=84?= <2322677577@qq.com> Date: Thu, 16 Feb 2023 22:30:00 +0800 Subject: [PATCH 5/5] 02 --- .../random.js" | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 "\350\214\203\351\233\250\346\232\204/\351\232\217\346\234\272\346\234\200\345\244\247/random.js" diff --git "a/\350\214\203\351\233\250\346\232\204/\351\232\217\346\234\272\346\234\200\345\244\247/random.js" "b/\350\214\203\351\233\250\346\232\204/\351\232\217\346\234\272\346\234\200\345\244\247/random.js" new file mode 100644 index 0000000..8be7df7 --- /dev/null +++ "b/\350\214\203\351\233\250\346\232\204/\351\232\217\346\234\272\346\234\200\345\244\247/random.js" @@ -0,0 +1,25 @@ +'use strict' +//模块 +var fs = require('fs'); +//最大文件 +var Maxfile = ''; + +var Max = 0; + +for (var i = 1; i <= 100; i++) { + //随机数 + var ran = Math.floor(Math.random() * (1000 - 1 + 1) + 1); + + var text = "" + ran + ""; + //文件名 + var file = "./" + i + ".txt" + + fs.writeFileSync(file, text); + //寻找最大值 + if(Number(text) > Max){ + Max = Number(text); + Maxfile = file; + } +} + +console.log(Maxfile); \ No newline at end of file -- Gitee