From 76bda6e6742862c136928c7a81507f6eda69f82b Mon Sep 17 00:00:00 2001 From: chaos <381810956@qq.com> Date: Sun, 2 May 2021 20:51:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Create=20=E7=AC=AC=E5=8D=81=E5=85=AB?= =?UTF-8?q?=E5=91=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\347\254\254\345\215\201\345\205\253\345\221\250/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\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" 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 00000000..e69de29b -- Gitee From 616074cc098392879f0911b7cdc0b14ef0d71ab3 Mon Sep 17 00:00:00 2001 From: chaos <381810956@qq.com> Date: Sun, 2 May 2021 20:52:26 +0800 Subject: [PATCH 2/2] js basic datatype --- .../week18_1.log" | 57 +++++++++++ .../week18_2.log" | 44 +++++++++ .../week18_3.log" | 96 +++++++++++++++++++ 3 files changed, 197 insertions(+) create mode 100644 "\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" create mode 100644 "\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" create mode 100644 "\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" 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 00000000..248a7862 --- /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 00000000..dab13456 --- /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 00000000..066a5ce7 --- /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