facebook

TOP 10 JavaScript errors to be aware of

TOP 10 JavaScript errors to be aware of
Average rating: 0
(0 votes)

Thanks! You’ve rated this material!

In this post, you will find the TOP 10 JavaScript errors to be aware of. We’re going to show you what causes them and how to prevent them from happening. If you will know these errors and will be able to handle them in the future it’ll definitely make you a better developer!

‘Rollbar’ did an interesting experiment. They’ve collected all the errors they faced and summarized how many times each one occurred. That helped to see the actual statistics with the most spread errors.

Here they are,

TOP 10 JavaScript errors to be aware of

  1. Uncaught TypeError: Cannot read property
    This one occurs in Chrome when you read a property or call a method on an undefined object.
  2. TypeError: ‘undefined’ is not an object (evaluating)
    This is an error that occurs in Safari when you read a property or call a method on an undefined object.
  3. TypeError: null is not an object (evaluating)
    This is an error that occurs in Safari when you read a property or call a method on a null object.
  4. (unknown): Script error
    The Script error occurs when an uncaught JavaScript error crosses domain boundaries in violation of the cross-origin policy.
  5. TypeError: Object doesn’t support property
    This is an error that occurs in IE when you call an undefined method.
  6. TypeError: ‘undefined’ is not a function
    This is an error that occurs in Chrome when you call an undefined function.
  7. Uncaught RangeError: Maximum call stack
    This is an error that occurs in Chrome under a couple of circumstances.
  8. TypeError: Cannot read property ‘length’
    This is an error that occurs in Chrome because of reading length property for an undefined variable.
  9. Uncaught TypeError: Cannot set property
    When we try to access an undefined variable it always returns undefined and we cannot get or set any property of undefined.
  10. ReferenceError: event is not defined
    This error is thrown when you try to access a variable that is undefined or is outside the current scope.

It turns out that a lot of these are null or undefined errors. A good static type checking system like Typescript can help you avoid them if you use the strict compiler option.

Anyway, you’d better read about all of these errors in details here.

Also, check our JS digest to know all the most popular recent repositories.

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Email info@syndicode.com
Phone (+1) 9035021111