在Typescript中取消定义变量

时间:2016-07-14 11:58:42

标签: javascript angularjs typescript

如何在赋值之后再次将变量设置为未定义?

为了检查,我使用了下划线功能_.isUndefined()

已经尝试myVariable = undefineddelete myVariable

1 个答案:

答案 0 :(得分:2)

查看下划线实现:https://github.com/jashkenas/underscore/blob/master/underscore.js#L1337

尝试myVariable = void 0;

相关问题