finally statement defines a block of code that will execute whether or not an exception was thrown.
finally statement can’t appear on its own; it must be after a try block.
var x = document.getElementById("point");
var y = document.getElementById("point1");
var z = document.getElementById("point2");
x.innerHTML = bike;
y.innerHTML = "I will always execute";
z.innerHTML = "I will not execute";
// code block to try
// code block to handle errors
// code block always execute
Please do google search for:
Join Our Channel
This channel is primarily useful for Full Stack Web Developer.
Share this Page
Meet the Author