diff --git "a/10\351\231\210\346\230\212\347\253\245/\344\275\234\344\270\232/22.11.14.html" "b/10\351\231\210\346\230\212\347\253\245/\344\275\234\344\270\232/22.11.14.html" new file mode 100644 index 0000000000000000000000000000000000000000..f74590347a6606ba6068d4f3c9b29acf24be911a --- /dev/null +++ "b/10\351\231\210\346\230\212\347\253\245/\344\275\234\344\270\232/22.11.14.html" @@ -0,0 +1,21 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git "a/10\351\231\210\346\230\212\347\253\245/\344\275\234\344\270\232/22.11.16.html" "b/10\351\231\210\346\230\212\347\253\245/\344\275\234\344\270\232/22.11.16.html" new file mode 100644 index 0000000000000000000000000000000000000000..4fde77a1c0bd1eeb9b88911580b75e252b4092a3 --- /dev/null +++ "b/10\351\231\210\346\230\212\347\253\245/\344\275\234\344\270\232/22.11.16.html" @@ -0,0 +1,24 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git "a/10\351\231\210\346\230\212\347\253\245/\347\254\224\350\256\260/22.11.14this,\346\255\243\345\210\231.md" "b/10\351\231\210\346\230\212\347\253\245/\347\254\224\350\256\260/22.11.14this,\346\255\243\345\210\231.md" new file mode 100644 index 0000000000000000000000000000000000000000..505f4fb73982d32736c2621a0aa2a610e3542e6c --- /dev/null +++ "b/10\351\231\210\346\230\212\347\253\245/\347\254\224\350\256\260/22.11.14this,\346\255\243\345\210\231.md" @@ -0,0 +1,49 @@ +### this + +隐式绑定:谁调用,指向谁 + +``` + var obj = { + a:'1', + fn: function (){ + console.log(this); + } + } + obj.fn();//a:'1' +``` + +当调用对象为箭头时this指向window(箭头函数本身没有this,里面的this指向的是父级函数中的this) + +new 中this:哪个对象调用,this指向该对象 + +``` +function Person(name){ + 'use strict' + this.name = name; + Person.prototype.sayHi = ()=>{ + console.log(this); + } + } +``` + +### 正则/ 判断 / + + {m}:匹配m次 + + {m,n}:匹配最少m次,最多n次 + + {m,}:匹配最少m次,最多无限次 + + + + {1,}:1次或者多次 简写形式: + + + {0,}:0次或多次 * + + {0,1}:0次或者1次 ?(?也表示懒惰模式--会尽可能少匹配) + + + +^:在[ ^123] 中开头使用为非的意思(必须为[ ]中的值) 在开头/^ /时表示必须以...开头 + +$:在结尾/ ^/ 时表示必须以..结尾 \ No newline at end of file diff --git "a/10\351\231\210\346\230\212\347\253\245/\347\254\224\350\256\260/22.11.16\346\255\243\345\210\2312.md" "b/10\351\231\210\346\230\212\347\253\245/\347\254\224\350\256\260/22.11.16\346\255\243\345\210\2312.md" new file mode 100644 index 0000000000000000000000000000000000000000..420e49a909781755d5030b9b1168ef9eb1a75945 --- /dev/null +++ "b/10\351\231\210\346\230\212\347\253\245/\347\254\224\350\256\260/22.11.16\346\255\243\345\210\2312.md" @@ -0,0 +1,32 @@ +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次 ? + +^非,在开头表示必须以下一个字符开头 + +$必须以上一个字符结尾 + +?=:紧跟着 + +?!:不紧跟着 + +\b:单词边界 \ No newline at end of file