标签: javascript angularjs typescript
如何在赋值之后再次将变量设置为未定义?
为了检查,我使用了下划线功能_.isUndefined()。
_.isUndefined()
已经尝试myVariable = undefined和delete myVariable
myVariable = undefined
delete myVariable
答案 0 :(得分:2)
查看下划线实现:https://github.com/jashkenas/underscore/blob/master/underscore.js#L1337
尝试myVariable = void 0;
myVariable = void 0;