摘要: for循环基本结构 begin:进入循环时执行一次 condition:在每次循环迭代之前检查,如果为 false,停止循环 body(循环体):条件为真时,重复运行。 step:在每次循环体迭代后执行。 所以循环的流程:begin ⇒ condition=> body ⇒step ⇒ condit 阅读全文
posted @ 2021-05-20 16:55 黑黑哈哈 阅读(228) 评论(0) 推荐(0) 编辑
摘要: ###箭头函数没有自己的this对象 箭头函数没有自己的this对象,所以在箭头函数取this的时候就是定义时上层作用域中的this function foo() { setTimeout(() => { console.log('id:', this.id); }, 100); } var id 阅读全文
posted @ 2021-05-20 13:47 黑黑哈哈 阅读(104) 评论(0) 推荐(0) 编辑