Answers for "throw new errpr"

52

throw new error(

throw new Error('Whoops!')
Posted by: Guest on March-17-2020
1

throw new error(

try {
    //something that causes an error
} catch (ex){
    if (ex instanceof TypeError){
        //handle the error
    } else if (ex instanceof ReferenceError){
        //handle the error
    } else {
        //handle all others
    }
}
Posted by: Guest on August-16-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language