摘要:
记录下,都让让,我要开始灌水了... 字符 描述 \ 将下一个字符标记为一个特殊字符(File Format Escape,清单见本表)、或一个原义字符(Identity Escape,有^$()*+?.[{|共计12个)、或一个向后引用(backreferences)、或一个八进制转义符。例如,“ 阅读全文
posted @ 2022-04-26 18:07
lutwelve
阅读(176)
评论(0)
推荐(0)
摘要:
for…in 循环 for..in 循环也会迭代继承的属性。 let animal = { eats: true }; let rabbit = { jumps: true, __proto__: animal }; // Object.keys 只返回自己的 key alert(Object.ke 阅读全文
posted @ 2022-04-26 18:03
lutwelve
阅读(182)
评论(0)
推荐(0)
摘要:
proto 和 [[Prototype]] 的区别 proto 是 [[Prototype]] 的因历史原因而留下来的 getter/setter 初学者常犯一个普遍的错误,就是不知道 proto 和 [[Prototype]] 的区别。 请注意,proto 与内部的 [[Prototype]] 不 阅读全文
posted @ 2022-04-26 18:02
lutwelve
阅读(199)
评论(0)
推荐(0)
摘要:
闭包是个老生常谈的问题,所以写个记录下什么是闭包,闭包怎么来的,这里就从代码块开始说起。 代码块 {...} 花括号中声明的变量对于外部是不可见的。 其中函数 function () {...}; if(){...};for(let i;;){...};while{...} // 例 1 if (t 阅读全文
posted @ 2022-04-26 17:59
lutwelve
阅读(76)
评论(0)
推荐(0)

浙公网安备 33010602011771号