title: Can syntax errors be caught in JavaScript?
body: <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError" rel="noreferrer">MDN states</a>:</p>
  
  <blockquote>
    <p>A SyntaxError is thrown when the JavaScript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code.</p>
  </blockquote>
  
  <p>But if there's a syntax error, how could the program even run in the first place?</p>
  
  <p>How can JavaScript syntax errors even be caught?</p>