1. Javascript supports exception handling.
2. In javascript try and catch and finally blocks are used for handling the exceptions.
3. Suspected code (code which throws exceptions) must be written in try block 
4. Exception handling code must be written in catch block.
4. Javascript doesn't supports multiple catch blocks for a single try block.
5. Finally block is supported in javascript which is just like java and c# languages.
6. Finally block is always executed irrespective of catch block execution.

try catch finally example:

try {
catch (e) {
finally {
  alert('from finally');

DOM (document object model):

When HTML or xml code is sent to browsers, parser (html or xml parser's) present in browsers will convert the source code into a logical tree like representation called dom tree. Through javascript code we can read/create or manipulate data present in dom tree. For example the following html code given to the browser is converted into dom tree structure as shown in the diagram. HTML Source code:
<title>DOM Tree representation</title>
<script language="javascript" type="text/javascript">
function fnDisplayValue() {
var otbNum=document.getElementById('tbNum');
Enter A number:<input type="text" id="tbNum" style="background-color:Gray;color:White"/><br/>
<input type="submit" id="btnSubmit" value="submit" onclick="fnDisplayValue()"/>

DOM Tree structure:

DOM Tree structure When user clicks on button javascript engine calls fnDisplayValue function. Note:Rectangular elements in dom are called as nodes.