Is it possible to overwrite the undefined in javascript?

后端 未结 3 832
萌比男神i
萌比男神i 2021-01-02 14:02

like

function myFunction(){
    var undefined = \"abc\";
}

If its possible then how to restrict not to allow that?

3条回答
  •  情话喂你
    2021-01-02 14:34

    Yes it is possible to overwrite undefined.

    This question has good solutions for working around that problem - How to check for "undefined" in JavaScript?

提交回复
热议问题