我们可以使用Object. create方法创建没有原型的对象。 const ol = {}; console. log(ol. toString()); // [object Object] const o2 = Object. create(null); console. log (o2. toString()); // throws an error o2. toString is not a function Was this helpful? YesNo 0 / 0 上一篇: 前端面试题:为什么此代码obj. someprop. x会引发错误? 下一篇: 前端面试题:Canvas和SVG有什么区别? 发表回复 取消回复0 Your email address will not be published. 在此浏览器中保存我的显示名称、邮箱地址和网站地址,以便下次评论时使用。