Skip to main content

JavaScript Reserved Words

JavaScript has a number of reserved words that have predefined meanings and cannot be used as identifiers (such as variable names, function names, etc.) in your code.

Here is a list of JavaScript reserved words:

break case catch class const continue debugger default delete do else enum export extends false finally for function if implements import in instanceof interface let new null package private protected public return super switch static this throw try true typeof var void while with yield

tip

The null and true keywords are not reserved words, but they are considered literals in JavaScript.

caution

Using any of these words as an identifier in your code can lead to syntax errors or unexpected behavior.