diff --git "a/\351\231\210\351\233\205\346\245\240/1.txt" "b/\351\231\210\351\233\205\346\245\240/1.txt" new file mode 100644 index 0000000000000000000000000000000000000000..8ea0a3e6f1099fb1b729b3dfc57bbf3c120f451d --- /dev/null +++ "b/\351\231\210\351\233\205\346\245\240/1.txt" @@ -0,0 +1 @@ +971 \ No newline at end of file diff --git "a/\351\231\210\351\233\205\346\245\240/2.txt" "b/\351\231\210\351\233\205\346\245\240/2.txt" new file mode 100644 index 0000000000000000000000000000000000000000..9f728587959d189de8b5dcadab2b3aec1276a169 --- /dev/null +++ "b/\351\231\210\351\233\205\346\245\240/2.txt" @@ -0,0 +1 @@ +88 \ No newline at end of file diff --git "a/\351\231\210\351\233\205\346\245\240/files.js" "b/\351\231\210\351\233\205\346\245\240/files.js" new file mode 100644 index 0000000000000000000000000000000000000000..d6fd2ca9313f8137f04f4b0bd46002a19e6b04a6 --- /dev/null +++ "b/\351\231\210\351\233\205\346\245\240/files.js" @@ -0,0 +1,23 @@ +'use strict'; +var fs=require('fs'); + +var max = 0; +var maxfile = ''; + +for (let index = 1; index <=2 ; index++) { + //随机 Math.random()*(最大值-最小值+1)+最小值 + + var a=Math.floor(Math.random()*(1000-1+1)+1) + + //创建文件 + var b =""+a+""; + fs.writeFileSync("./"+index+".txt",b); + + if (Number(b) > max) { + max = Number(b); + maxfile = "./"+index+".txt"; + } +} +// console.log(max); +console.log(maxfile); + diff --git "a/\351\231\210\351\233\205\346\245\240/idemo.html" "b/\351\231\210\351\233\205\346\245\240/idemo.html" new file mode 100644 index 0000000000000000000000000000000000000000..56efbdba61ff12f90f864930b9a85eac0259666d --- /dev/null +++ "b/\351\231\210\351\233\205\346\245\240/idemo.html" @@ -0,0 +1,12 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git "a/\351\231\210\351\233\205\346\245\240/\344\275\234\344\270\232/jjcc.js" "b/\351\231\210\351\233\205\346\245\240/\344\275\234\344\270\232/jjcc.js" new file mode 100644 index 0000000000000000000000000000000000000000..5af162ad8035c0b27060077fece810837c9e6513 --- /dev/null +++ "b/\351\231\210\351\233\205\346\245\240/\344\275\234\344\270\232/jjcc.js" @@ -0,0 +1,26 @@ + + +function jia(a,b) { + console.log(a+b); + return a+b; +} + +module.exports.jia = jia; + +function jian(c,d){ + console.log(c-d); + return c-d; +} +module.exports.jian =jian; + +function cheng(e,f){ + console.log(e*f); + return e*f; +} +module.exports.cheng =cheng; + +function chu(g,h){ + console.log(g/h); + return g/h; +} +module.exports.chu =chu; diff --git "a/\351\231\210\351\233\205\346\245\240/\344\275\234\344\270\232/use.js" "b/\351\231\210\351\233\205\346\245\240/\344\275\234\344\270\232/use.js" new file mode 100644 index 0000000000000000000000000000000000000000..e85b94941c5a1a756bc1d06e7a1039830f4b4408 --- /dev/null +++ "b/\351\231\210\351\233\205\346\245\240/\344\275\234\344\270\232/use.js" @@ -0,0 +1,11 @@ +let obj = require('./jjcc.js') + +console.log(obj) +let num=obj.jia(7,8); +let num1=obj.jian(10,4); +let num2=obj.cheng(1,3); +let num3=obj.chu(10,2); +// console.log(num); +// console.log(num1); +// console.log(num2); +// console.log(num3);