From 2bcc1ac834dfb2ed13f0550b5b7d4d8d3d0e06f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=85=88=E6=9D=B0?= <19892226650@139.com> Date: Tue, 15 Nov 2022 15:38:21 +0000 Subject: [PATCH 1/4] =?UTF-8?q?38=E5=BC=A0=E5=85=88=E6=9D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张先杰 <19892226650@139.com> --- ...\346\254\241\344\275\234\344\270\232.html" | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 "38\345\274\240\345\205\210\346\235\260/\344\275\234\344\270\232/2022-11-15js\347\254\254\345\215\201\344\272\224\346\254\241\344\275\234\344\270\232.html" diff --git "a/38\345\274\240\345\205\210\346\235\260/\344\275\234\344\270\232/2022-11-15js\347\254\254\345\215\201\344\272\224\346\254\241\344\275\234\344\270\232.html" "b/38\345\274\240\345\205\210\346\235\260/\344\275\234\344\270\232/2022-11-15js\347\254\254\345\215\201\344\272\224\346\254\241\344\275\234\344\270\232.html" new file mode 100644 index 0000000..ab592f0 --- /dev/null +++ "b/38\345\274\240\345\205\210\346\235\260/\344\275\234\344\270\232/2022-11-15js\347\254\254\345\215\201\344\272\224\346\254\241\344\275\234\344\270\232.html" @@ -0,0 +1,24 @@ + + + + + + + Document + + + + + + \ No newline at end of file -- Gitee From f60af831616b0c998013fbfb04a2f7c82ba69de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=85=88=E6=9D=B0?= <19892226650@139.com> Date: Tue, 15 Nov 2022 15:39:13 +0000 Subject: [PATCH 2/4] =?UTF-8?q?38=E5=BC=A0=E5=85=88=E6=9D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张先杰 <19892226650@139.com> --- ...02\344\270\223\344\270\232\350\257\276.md" | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 "38\345\274\240\345\205\210\346\235\260/\347\254\224\350\256\260/2022-11-14js\347\254\254\344\272\224\350\212\202\344\270\223\344\270\232\350\257\276.md" diff --git "a/38\345\274\240\345\205\210\346\235\260/\347\254\224\350\256\260/2022-11-14js\347\254\254\344\272\224\350\212\202\344\270\223\344\270\232\350\257\276.md" "b/38\345\274\240\345\205\210\346\235\260/\347\254\224\350\256\260/2022-11-14js\347\254\254\344\272\224\350\212\202\344\270\223\344\270\232\350\257\276.md" new file mode 100644 index 0000000..88f4e89 --- /dev/null +++ "b/38\345\274\240\345\205\210\346\235\260/\347\254\224\350\256\260/2022-11-14js\347\254\254\344\272\224\350\212\202\344\270\223\344\270\232\350\257\276.md" @@ -0,0 +1,38 @@ +### this + +this产生在函数执行时 + +默认绑定:默认指向windows + +隐式绑定:谁调用,指向谁 + +显式绑定:call apply bind + +箭头函数本身没有this,里面的this指向的是父级函数中的this + +# 12、正则 + +创建正则 + + var re = /ab+c/; + var re = new RegExp("ab+c"); + +贪婪模式:能多就多 + +非贪婪模式:在正则后加?,能少就少 + +{m}:匹配m次 + +{m,n}:匹配最少m次,最多n次 + +{m,}:匹配最少m次,最多无限次 + +{1,}:1次或者多次 + + +{0,}:0次或多次 * + +{0,1}:0次或者1次 ? + +^非,在开头表示必须以下一个字符开头 + +$必须以上一个字符结尾 \ No newline at end of file -- Gitee From c94ffff8fe1e858bbaa7a73cc0970d4d75be6693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=85=88=E6=9D=B0?= <19892226650@139.com> Date: Thu, 17 Nov 2022 03:15:39 +0000 Subject: [PATCH 3/4] =?UTF-8?q?38=E5=BC=A0=E5=85=88=E6=9D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张先杰 <19892226650@139.com> --- ...32\350\257\276\347\254\224\350\256\260.md" | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 "38\345\274\240\345\205\210\346\235\260/\347\254\224\350\256\260/2022-11-16js\347\254\254\345\215\201\345\205\255\350\212\202\344\270\223\344\270\232\350\257\276\347\254\224\350\256\260.md" diff --git "a/38\345\274\240\345\205\210\346\235\260/\347\254\224\350\256\260/2022-11-16js\347\254\254\345\215\201\345\205\255\350\212\202\344\270\223\344\270\232\350\257\276\347\254\224\350\256\260.md" "b/38\345\274\240\345\205\210\346\235\260/\347\254\224\350\256\260/2022-11-16js\347\254\254\345\215\201\345\205\255\350\212\202\344\270\223\344\270\232\350\257\276\347\254\224\350\256\260.md" new file mode 100644 index 0000000..b0b098e --- /dev/null +++ "b/38\345\274\240\345\205\210\346\235\260/\347\254\224\350\256\260/2022-11-16js\347\254\254\345\215\201\345\205\255\350\212\202\344\270\223\344\270\232\350\257\276\347\254\224\350\256\260.md" @@ -0,0 +1,26 @@ +正则 +//自左向右匹配,一旦匹配上 就不再回头(数字排列时由大到小先十位后个位) +// console.log(/[1-9][\d]|\d/.exec('9')); +//反捕获:?::将捕获到的子表达式隐藏 +//?=:紧跟着 ?!:不紧跟着 ?:-->反捕获 ??--> 非贪婪{0,1} + + +可以用括号来分隔数据 并改变类似于数组(0为要查询的的'2022-11-16'1为第一个括号框起来的数字) +// console.log(/(\d{4})-(\d{2})-(\d{2})/.exec('2022-11-16')); +可以用regExp.$1来输出第一个数字是什么,$2就是第二个 +// console.log(RegExp.$1); + +\g 全局匹配 +// console.log( '1a,2a,3a'.replace(/a/g,'b')); +\i 不区分大小写 +// console.log( '1a,2a,3a,1A'.match(/1a/ig)); +\b单词边界 +// console.log(/e\b/.exec('eapples')); +| 或者的意思 +// 文件名由字母、数字、下划线构成,不可以以数字开头,后缀为.zip/rar/gz +// console.log(/[^\d]*\.zip|rar|gz/.exec('zip.zip')); + +异常处理 +//try:尝试捕获异常,里面放的是可能出错的代码 +//1.报错之后的代码中止执行 +//2.每次只能捕获一个异常 \ No newline at end of file -- Gitee From 3082a0933ef9d1659276af4d482939f122426ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=85=88=E6=9D=B0?= <19892226650@139.com> Date: Thu, 17 Nov 2022 03:16:07 +0000 Subject: [PATCH 4/4] =?UTF-8?q?38=E5=BC=A0=E5=85=88=E6=9D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张先杰 <19892226650@139.com> --- ...\346\254\241\344\275\234\344\270\232.html" | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 "38\345\274\240\345\205\210\346\235\260/\344\275\234\344\270\232/2022-11-16js\347\254\254\345\215\201\345\205\255\346\254\241\344\275\234\344\270\232.html" diff --git "a/38\345\274\240\345\205\210\346\235\260/\344\275\234\344\270\232/2022-11-16js\347\254\254\345\215\201\345\205\255\346\254\241\344\275\234\344\270\232.html" "b/38\345\274\240\345\205\210\346\235\260/\344\275\234\344\270\232/2022-11-16js\347\254\254\345\215\201\345\205\255\346\254\241\344\275\234\344\270\232.html" new file mode 100644 index 0000000..f60c2c6 --- /dev/null +++ "b/38\345\274\240\345\205\210\346\235\260/\344\275\234\344\270\232/2022-11-16js\347\254\254\345\215\201\345\205\255\346\254\241\344\275\234\344\270\232.html" @@ -0,0 +1,25 @@ + + + + + + + Document + + + + + + \ No newline at end of file -- Gitee