diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/.keep" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/week18_1.log" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/week18_1.log" new file mode 100644 index 0000000000000000000000000000000000000000..248a78627bcdc21d2ff945eb8eb319502b29658e --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/week18_1.log" @@ -0,0 +1,57 @@ +// 声明一个可变变量 +var a = 1; +let b = 2; +a +1 +b +2 + +const NAME = "chaos" +NAME +"chaos" + +let minNum = 20; +let maxNum = 30; +parseInt(Math.random()*maxNum); +20 +parseInt(Math.random()*maxNum); +29 +parseInt(Math.random()*maxNum); +26 +parseInt(Math.random()*maxNum); +3 +parseInt(Math.random()*maxNum); +7 +parseInt(Math.random()*maxNum); +11 +parseInt(Math.random()*maxNum); +24 +parseInt(Math.random()*maxNum); +4 +parseInt(Math.random()*maxNum); +8 +parseInt(Math.random()*maxNum); +2 + +// 普通函数 +function randInt(minNum, maxNum){ + return parseInt(Math.random()*(maxNum-minNum)) + minNum +} +randInt(10,20) +17 +randInt(10,20) +17 +randInt(10,20) +11 +randInt(10,20) +18 +randInt(10,20) +11 +randInt(10,20) +15 + +// 匿名函数 +(function(minNum, maxNum){ + console.log(parseInt(Math.random()*(maxNum-minNum)) + minNum) +})(12,22) + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/week18_2.log" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/week18_2.log" new file mode 100644 index 0000000000000000000000000000000000000000..dab1345627dfe3f3e2c0ac6b9745d6f69b42e23f --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/week18_2.log" @@ -0,0 +1,44 @@ +// 变量和函数用小驼峰命名法 +let myVariable = 1; +myVariable +1 + +// 常量用大写 +const MAX_NUM = 1000; +MAX_NUM +1000 + +// 类和构造函数使用大驼峰命名法 +function Dog(){ + this.color = 'black'; +} +dog = new Dog(); + +typeof false +"boolean" +typeof Boolean +"function" +typeof 1 +"number" +typeof 1.0 +"number" +typeof 1n +"bigint" +typeof '1' +"string" +typeof Symbol(1) +"symbol" +let c = Symbol(2) +typeof c; +"symbol" + +let myArray = [1, 2] +myArray[3] = 'a' +"a" + +let myMap = new Map() +myMap + +let mySet = new Set() +mySet.add(1) + diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/week18_3.log" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/week18_3.log" new file mode 100644 index 0000000000000000000000000000000000000000..066a5ce7d09c8d443f4b9b9f30f2ec9528a96f3d --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/2\347\217\255/2\347\217\255_chaos/\347\254\254\345\215\201\345\205\253\345\221\250/week18_3.log" @@ -0,0 +1,96 @@ +a = "1" + 2 +"12" +b = "2" + {} +"2[object Object]" +for(i=0; i