title: JavaScript try-catch not working
body: <p>I am new to Java Script. In the below code I am trying to create an error intentionally to learn how try...catch works. But nothing is running. </p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;p id="demo"&gt;&lt;/p&gt;
  &lt;script&gt;
  try {
      adddlert("Hi User!");
  }
  catch(Error e) {
      document.getElementById("demo").innerHTML = e.message;
  }
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What I am missing?</p>