Error

2020-03-29  本文已影响0人  再见噜噜班

Error类型

try{
    new Array(-1)
}catch(e){
    console.log(e) //RangeError: Invalid array length
}
try{
    let a = t+1
}catch(e){
    console.log(e) //ReferenceError: t is not defined
}
let 1a=1;
// Uncaught SyntaxError: Invalid or unexpected token
try{
    let a =1
    a.push(1)
}catch(e){
    console.log(e) //TypeError: a.push is not a function
}
上一篇 下一篇

猜你喜欢

热点阅读