diff --git "a/\345\274\240\351\224\264 (2)/2.21homework/calculate.js" "b/\345\274\240\351\224\264 (2)/2.21homework/calculate.js" new file mode 100644 index 0000000000000000000000000000000000000000..0695869dcb85c36a290127c1a58af4f87bf190bd --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.21homework/calculate.js" @@ -0,0 +1,19 @@ +module.exports.calculate = { + add:function(a,b){ + if( !isNaN( a ) | !isNaN( b ) ) + { + return console.log(a+b) + }else{ + console.log("数据类型错误?") + } + }, + del:function(a,b){ + return console.log(a-b) + }, + cf:function(a,b){ + return console.log(a*b) + }, + chf:function(a,b){ + return console.log(a/b) + } +} \ No newline at end of file diff --git "a/\345\274\240\351\224\264 (2)/2.21homework/demo.js" "b/\345\274\240\351\224\264 (2)/2.21homework/demo.js" new file mode 100644 index 0000000000000000000000000000000000000000..cddcd8db18a6c8ef66d04fb67601a5a1acd0327f --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.21homework/demo.js" @@ -0,0 +1,3 @@ +let cal = require("./calculate.js"); +console.log(cal.calculate.add("zhagnkai",5)); +console.log(cal.calculate.del(10,10)); diff --git "a/\345\274\240\351\224\264 (2)/2.21homework/text.js" "b/\345\274\240\351\224\264 (2)/2.21homework/text.js" new file mode 100644 index 0000000000000000000000000000000000000000..0d820a88343daa927a197bba3d3d4a8c7f76371b --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.21homework/text.js" @@ -0,0 +1,7 @@ +let num = 5 +console.log(isNaN(num)) ; +if( !isNaN( num ) ) + { + alert('是数字'); + return false; + } diff --git "a/\345\274\240\351\224\264 (2)/2.21homework/workspace.code-workspace" "b/\345\274\240\351\224\264 (2)/2.21homework/workspace.code-workspace" new file mode 100644 index 0000000000000000000000000000000000000000..baa8bf2dffc1f1aa2760fa7e0f262d9ea39d979a --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.21homework/workspace.code-workspace" @@ -0,0 +1,11 @@ +{ + "folders": [ + { + "path": "..\\..\\11.13" + }, + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file diff --git "a/\345\274\240\351\224\264 (2)/2.23homework/import.js" "b/\345\274\240\351\224\264 (2)/2.23homework/import.js" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/\345\274\240\351\224\264 (2)/2.23homework/\344\274\230\345\214\226demo.js" "b/\345\274\240\351\224\264 (2)/2.23homework/\344\274\230\345\214\226demo.js" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/\345\274\240\351\224\264 (2)/2.24homewor/1\345\217\267\346\226\207\344\273\266" "b/\345\274\240\351\224\264 (2)/2.24homewor/1\345\217\267\346\226\207\344\273\266" new file mode 100644 index 0000000000000000000000000000000000000000..9eacd6c173b44ad60e00e6d1fae8ddde455161c8 --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.24homewor/1\345\217\267\346\226\207\344\273\266" @@ -0,0 +1 @@ +我的包 \ No newline at end of file diff --git "a/\345\274\240\351\224\264 (2)/2.24homewor/2\345\217\267\346\226\207\344\273\266" "b/\345\274\240\351\224\264 (2)/2.24homewor/2\345\217\267\346\226\207\344\273\266" new file mode 100644 index 0000000000000000000000000000000000000000..9eacd6c173b44ad60e00e6d1fae8ddde455161c8 --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.24homewor/2\345\217\267\346\226\207\344\273\266" @@ -0,0 +1 @@ +我的包 \ No newline at end of file diff --git "a/\345\274\240\351\224\264 (2)/2.24homewor/3\345\217\267\346\226\207\344\273\266" "b/\345\274\240\351\224\264 (2)/2.24homewor/3\345\217\267\346\226\207\344\273\266" new file mode 100644 index 0000000000000000000000000000000000000000..9eacd6c173b44ad60e00e6d1fae8ddde455161c8 --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.24homewor/3\345\217\267\346\226\207\344\273\266" @@ -0,0 +1 @@ +我的包 \ No newline at end of file diff --git "a/\345\274\240\351\224\264 (2)/2.24homewor/4\345\217\267\346\226\207\344\273\266" "b/\345\274\240\351\224\264 (2)/2.24homewor/4\345\217\267\346\226\207\344\273\266" new file mode 100644 index 0000000000000000000000000000000000000000..9eacd6c173b44ad60e00e6d1fae8ddde455161c8 --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.24homewor/4\345\217\267\346\226\207\344\273\266" @@ -0,0 +1 @@ +我的包 \ No newline at end of file diff --git "a/\345\274\240\351\224\264 (2)/2.24homewor/5\345\217\267\346\226\207\344\273\266" "b/\345\274\240\351\224\264 (2)/2.24homewor/5\345\217\267\346\226\207\344\273\266" new file mode 100644 index 0000000000000000000000000000000000000000..9eacd6c173b44ad60e00e6d1fae8ddde455161c8 --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.24homewor/5\345\217\267\346\226\207\344\273\266" @@ -0,0 +1 @@ +我的包 \ No newline at end of file diff --git "a/\345\274\240\351\224\264 (2)/2.24homewor/aboutfs.js" "b/\345\274\240\351\224\264 (2)/2.24homewor/aboutfs.js" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/\345\274\240\351\224\264 (2)/2.24homewor/fs.js" "b/\345\274\240\351\224\264 (2)/2.24homewor/fs.js" new file mode 100644 index 0000000000000000000000000000000000000000..f041b4304a2a4219e04859267560de6c20a5cdaf --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.24homewor/fs.js" @@ -0,0 +1,17 @@ +let fs = require("fs"); + + + +for(let i = 1 ;i<=5;i++){ + +let fd = fs.openSync(`${i}号文件`,'w'); + +fs.writeSync(fd,"我的yanyan",function(err){ + if(err){ + throw err ; + } +}); + +fs.closeSync(fd) + +} \ No newline at end of file diff --git "a/\345\274\240\351\224\264 (2)/2.24homewor/\345\217\267\346\265\213\350\257\225\346\226\207\344\273\266.txt" "b/\345\274\240\351\224\264 (2)/2.24homewor/\345\217\267\346\265\213\350\257\225\346\226\207\344\273\266.txt" new file mode 100644 index 0000000000000000000000000000000000000000..9eacd6c173b44ad60e00e6d1fae8ddde455161c8 --- /dev/null +++ "b/\345\274\240\351\224\264 (2)/2.24homewor/\345\217\267\346\265\213\350\257\225\346\226\207\344\273\266.txt" @@ -0,0 +1 @@ +我的包 \ No newline at end of file diff --git "a/\345\274\240\351\224\264 (2)/2.24homewor/\345\274\202\345\270\270\346\234\272\345\210\266.js" "b/\345\274\240\351\224\264 (2)/2.24homewor/\345\274\202\345\270\270\346\234\272\345\210\266.js" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391