1. Uncaught TypeError: a is not a function 类型错误
// a 是一个变量,却当做函数去调用,则会出现报错
var a = 'web02';
a();
2. Uncaught ReferenceError: a is not defined 引用错误
//作用域当中并未定义变量 a
console.log(a);
3. Uncaught TypeError: Assignment to constant variable 类型错误 指派常数为变量
//IP 定义为一个常量,不可以修改它的值
const IP = 205
IP = 1;
4. Uncaught SyntaxError: Unexpected token ' { in JSON at position 597 ' 语法错误无法解析标点符号
//多写了一个.
console..log(a)
5. Failed to load resource: net::ERR_FILE_NOT_FOUND
加载资源失败 !‐‐请求的none.js 路径错误或者不存在‐‐>
<script src="none.js"></script>
6. Uncaught RangeError: Invalid array length
范围错误 无效的数组长度
//赋值了错误的长度
new Array(‐1)
7. Uncaught URIError: URI malformed url参数不正确
主要是encodeURI()、decodeURI()、encodeURIComponent()、decodeURIComponent()、escape()和
unescape()这六个函数
//参数传递错误
decodeURI('%2')