undefin 出现的情况

1 ) 访问不存在的变量时 

2)访问对象不存在的属性时

3)访问数组中不存在的索引

4)形参没有赋值

5)函数没有返回值时 默认返回undefine

6)解构不成功返回的undefine

posted on 2022-11-22 23:30  totau  阅读(33)  评论(0编辑  收藏  举报

导航