11 2021 档案

个人关于对象的属性值为函数在重新赋值给对象属性过程中this指向window理解
摘要:例 window.name = 'window'; const obj = { name: 'obj', getName() { console.log(this.name); } }; (obj.getName = obj.getName)() // window 理解:obj.getName = 阅读全文

posted @ 2021-11-25 15:47 shenhf 阅读(168) 评论(0) 推荐(0)

个人闭包理解(结合代码)
摘要:使用debounce函数做了一个闭包的个人理解<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name 阅读全文

posted @ 2021-11-04 12:00 shenhf 阅读(50) 评论(0) 推荐(0)

导航