Skip to main content
js.stuartsm
  • Home
  • Learn
  • Reference
  • Glossary
  • Projects
  • Search
  • About
  1. Reference
  2. Errors

Errors

Built-in error types and what triggers them.

  • ReferenceErrorThrown when code refers to a binding that doesn't exist โ€” the code was valid JavaScript, but the name it looked for wasn't there when it ran.
  • SyntaxErrorThrown when code isn't valid JavaScript at all โ€” the engine refuses to run any of the file, not just the broken line.
  • TypeErrorThrown when an operation is attempted on a value that doesn't support it โ€” reading a property of null, calling something that isn't a function.

A JavaScript learning and reference site โ€” read to learn, search to look something up.

  • About
  • Reference
  • Curriculum
  • RSS feed