gpt4 book ai didi

javascript - 在 Typescript 中取消定义变量

转载 作者:行者123 更新时间:2023-11-30 15:56:58 25 4
gpt4 key购买 nike

如何在给变量赋值后再次将其设置为未定义状态?

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

已经尝试过 myVariable = undefineddelete myVariable

最佳答案

查看下作用域实现:https://github.com/jashkenas/underscore/blob/master/underscore.js#L1337

试试 myVariable = void 0;

关于javascript - 在 Typescript 中取消定义变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38373623/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com