Error Handling in Javascript <div class="jumbotron"> <button class="btn btn-danger" onclick="myFunc()">Click Me</button> </div> /* var myFunc=function() { var a = 100; var b = 0; try { throw("Divide by zero"); var c = a / b; } catch(e) { alert(e); } finally { alert("in finally"); } }*/ window.onerror=function(msg,url,ln) { alert(msg); alert(url); ...
I jot down whatever I learn from different sources.Written for personal use. But anyone can learn.