Skip to content
Wepress
Main Navigation
Home
Examples
基础
HTML
CSS
JavaScript
编程
前端安全
场景题
工程化
性能优化
编程题
跨端技术
框架
Node
React
TypeScript
Vue
小程序
计算机网络
其他
AI相关
leetcode
工具
算法
计算机基础
趣味题
选择题
Appearance
Menu
Return to top
On this page
js中的undefined和 ReferenceError: xxx is not defined 有什么区别?
参考答案:
ReferenceError:当尝试引用一个未定义的变量/函数时,就会抛出ReferenceError。
undefined:当一个变量声明后,没有被赋值,那么它就是undefined类型。