How dangerous is it in JavaScript, really, to assume undefined is not overwritten?

后端 未结 8 961
Happy的楠姐
Happy的楠姐 2020-11-27 04:36

Every time anyone mentions testing against undefined, it\'s pointed out that undefined is not a keyword so it could be set to \"hello\", so you sho

8条回答
  •  一整个雨季
    2020-11-27 04:47

    It's not dangerous at all. It can only be overwritten when running on an ES3 engine and that's not likely to be used any more.

提交回复
热议问题