What are some of the most common JavaScript errors?
While JavaScript is a fairly easy language to learn, it still has its share of pitfalls. Here are some of the common JavaScript errors:
Syntax Errors
Syntax errors are the easiest errors to fix because they’re caused by simple mistakes in your code. Line breaks, indentation and extra spaces will cause syntax errors if they’re not done correctly.
Logical Errors
Logical errors are a little more difficult to find because they occur when your code doesn’t make sense or can’t run. Two common logical errors are infinite loops and missing steps in your logic (for example, a function that needs to return data doesn’t do so).
Runtime Errors
Runtime errors occur when your code runs but throws an error or gives unexpected results.
Read more: https://www.toptal.com/javascript/10-most-common-javascript-mistakes