What are syntax errors in JavaScript?

JavascriptWeb DevelopmentFront End Technology

Syntax errors also called parsing errors, occur at compile time in traditional programming languages and at interpret time in JavaScript. For example, the following line causes a syntax error because it is missing a closing parenthesis.

<script>
   <!--
      window.print(;
   //-->
</script>

When a syntax error occurs in JavaScript, only the code contained within the same thread as the syntax error is affected and the rest of the code in other threads gets executed assuming nothing in them depends on the code containing the error.  

raja
Published on 16-Feb-2018 12:38:50
Advertisements