What is the difference in Javascript between 'undefined' and 'not defined'?

前端 未结 8 2203
半阙折子戏
半阙折子戏 2020-11-29 03:21

If you attempt to use a variable that does not exist and has not been declared, javascript will throw an error. var name is not defined, and the script will sto

8条回答
  •  無奈伤痛
    2020-11-29 03:56

    • not defined - instance is not declared and used;
    • undefined - instance declared and used without it value.

提交回复
热议问题