1. Glossary
  2. Syntax error

Syntax error

An exception caused by the incorrect use of a pre-defined syntax. Syntax errors are detected while compiling or parsing source code.

For example, if you leave off a closing brace (}) when defining a JavaScript function, you trigger a syntax error. Browser development tools display JavaScript and CSS syntax errors in the console.

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /