title: check eval() error in Javascript
body: <p>I have made a calculator using html css Javascript, I came through so many input problems, so to calculate the result ( '=' ) I used the function eval(), I want to know what does it return exactly and how to spot errors and fix them, for example : typing ***/+6 and clicking on the '=', will do nothing, I want to display an error message, I tried try-catch but it didn't work :</p>
  
  <pre><code>function res() { 
      var r=eval(document.getElementById("_input").textContent); 
      try{ 
          eval(document.getElementById("_input").textContent);        
      }   
      catch(error){   
          document.getElementById("res").innerHTML="Error"; 
      }
  }
  </code></pre>