bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/JavaScript/Debugging, Projects, and Reference
JavaScript•Debugging, Projects, and Reference

JavaScript Error Reference

Concept visual

JavaScript Error Reference

push / pop from the top({[← top

The Error Object

JavaScript has a built in error object that provides error information when an error occurs. The error object provides two useful properties: name and message.

Error Object Properties

Property

Description name

Sets or returns an error name message

Sets or returns an error message (a string)

Error Names

Six different values can be returned by the error name property:

Error Name

Description

Try it

EvalError

Formula

Deprecated - use SyntaxError instead

RangeError

A number "out of range" has occurred Try it »

ReferenceError

An illegal reference has occurred

Try it »

SyntaxError

A syntax error has occurred

Try it »

TypeError

A type error has occurred

Try it »

URIError

An error in encodeURI() has occurred

Try it »

Non-Standard Properties and Methods

Do not use these properties and methods in public web sites. They will not work in all browsers.

Property

Description arguments

Deprecated caller

Deprecated columnNumber

Previous

ECMAScript 2024

Next

JavaScript Debugging Errors