猿问

js中有没有像php中unset一样函数?

js中有没有像php中unset一样函数


慕侠2389804
浏览 1929回答 3
3回答

动漫人物

delete不就能用吗?如果用var 定义,就不能注销如果不用var 就能注销var hello="hello";delete(hello);alert(hello); //hellohello="hello";delete(hello);alert(hello): //出错hello未定义
随时随地看视频慕课网APP
我要回答