Fabian Ros

Fabian Ros

Errors – JavaScript Basics

try statement allows to analyse block of code for errors. catch statement allows to handle error. throw statement allows to create custom errors. finally statement allows to carry out code, after try & catch, regardless of result. Try and Catch JS statements try and catch come in pairs.…

Statements – JavaScript Basics

Statements are “instructions” to be “executed” by Web Browser. JS Statement This is a simple statement to write “Code Projects” inside Html element. <!DOCTYPE html> <html> <body> <h1>JS Statements</h1> <p>JS statements are executed by browser.</p> <p id=”ex”></p> <script> document.getElementById(“ex”).innerHTML =…