摘要: 用来访问对象的this 不可靠的外部变量名访问 let user = { name: "John", age: 30, sayHi() { alert(user.name); // "user" 外部变量名 } }; user.sayHi(); // TypeError: Cannot read p 阅读全文
posted @ 2024-11-01 17:03 GJ504b 阅读(27) 评论(0) 推荐(0)