From bf37d460476530dc365daea4769fe8531dedf4f1 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 06:20:58 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 范雨暄 <2322677577@qq.com> --- .../\345\205\250\345\261\200.js" | 6 ++++++ .../\346\250\241\345\235\227.js" | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 "\345\212\240\345\207\217\344\271\230\351\231\244/\345\205\250\345\261\200.js" create mode 100644 "\345\212\240\345\207\217\344\271\230\351\231\244/\346\250\241\345\235\227.js" diff --git "a/\345\212\240\345\207\217\344\271\230\351\231\244/\345\205\250\345\261\200.js" "b/\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..8406ca6 --- /dev/null +++ "b/\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/\345\212\240\345\207\217\344\271\230\351\231\244/\346\250\241\345\235\227.js" "b/\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..d2eff30 --- /dev/null +++ "b/\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 c3d72f14e3cea74c463ae063a668945fe86fe7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E4=BD=B3=E4=B8=BD?= <2898669424@qq.com> Date: Thu, 16 Feb 2023 08:50:51 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘佳丽 <2898669424@qq.com> --- .../deom.js" | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 "\351\232\217\346\234\272\347\224\237\346\210\220\346\226\207\344\273\266/deom.js" diff --git "a/\351\232\217\346\234\272\347\224\237\346\210\220\346\226\207\344\273\266/deom.js" "b/\351\232\217\346\234\272\347\224\237\346\210\220\346\226\207\344\273\266/deom.js" new file mode 100644 index 0000000..a13fb60 --- /dev/null +++ "b/\351\232\217\346\234\272\347\224\237\346\210\220\346\226\207\344\273\266/deom.js" @@ -0,0 +1,16 @@ +'use strict'//严格模式 +var fs = require('fs'); +var Maxfile =''//最大文件名 +var Max = 0; +for(var i =1; i<=100; i++){ + // Math.floor(Math.random()*(max-min+1)+min)随机固定格式 + var sj =Math.floor(Math.random() * (1000 -1 + 1)+1); + var text=""+sj+"";//sj number转文本 + var file="./"+i+".txt";//i 转文本 + fs.writeFileSync(file,text);//读文件建文件 + if(Number(text)>Max){ + Max=Number(text);//文本里面的内容和0比较,比0大max就替换成文本内容 + Maxfile=file; + } +} +console.log(Maxfile); \ No newline at end of file -- Gitee