
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the three types of errors I can expect in my JavaScript script?
The following are the three types of errors you can expect in JavaScript −
Syntax Errors
Syntax errors also called parsing errors, occur at compile time in traditional programming languages and at interpret time in JavaScript.
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.
Runtime Errors
Runtime errors, also called exceptions, occur during execution after compilation/interpretation. Exceptions also affect the thread in which they occur, allowing other JavaScript threads to continue normal execution.
Logical Errors
Logic errors can be the most difficult type of errors to track down. These errors are not the result of a syntax or runtime error. Instead, they occur when you make a mistake in the logic that drives your script and you do not get the result you expected.
You cannot catch those errors because it depends on your business requirement what type of logic you want to put in your program.
- Related Questions & Answers
- What are the different types of errors in JavaScript?
- What are the three types of Risk Preferences?
- How can I catch errors from subprocess in a python cgi script?
- What are syntax errors in JavaScript?
- What are runtime errors in JavaScript?
- PHP Types of Errors
- Should I include language="javascript" in my SCRIPT tags?
- How do I check what version of Python is running my script?
- Should I include type=“text/javascript” in my SCRIPT tags?
- Should I write my script in the body or the head of the HTML?
- What are the various types of comments in JavaScript?
- What are the types of tags involved in javascript?
- What are different Navigator properties I can use on my web page?
- How can I add debugging code to my JavaScript?
- How can I increase the page rank of my website?