lgwebdream / FE-Interview

🔥🔥🔥 前端面试,独有前端面试题详解,前端面试刷题必备,1000+前端面试真题,Html、Css、JavaScript、Vue、React、Node、TypeScript、Webpack、算法、网络与安全、浏览器
https://lgwebdream.github.io/FE-Interview/
Other
6.76k stars 897 forks source link

考察原型链 #1231

Closed nickzone closed 2 years ago

nickzone commented 2 years ago

a.a(); // 报错,a未定义,因为对象a的原型链是 A.prototype -> Object.prototype -> null a.b(); // 可弹出 alert(2)