我们可以使用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
Proudly powered by WordPress