Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这一定很容易,但我找不到解决方案。我有一个我想现在未定义的对象。如何将 typeof 更改为未定义?谢谢!
凯尔
您不能制作对象本身undefined,但可以制作引用它的变量undefined。
undefined
var myObj = { ... }; myObj = undefined;
您应该可以使用关键字“删除”将其删除。那么它的引用将是未定义的。
delete myObj;