TRY And Catch

 console.log("Helloo");

console.log("Helloo");
try{
console.log(a);
}
// catch{
//     console.log("An error caught");
// }

// THIS ERROR CAN BE PRINTED
catch(err){
    console.log(err);
    console.log("error caught");
}

Comments

Popular posts from this blog

Callback Hell

TODO list with DOM

Refactoring callback hell code