DEV Community 👩‍💻👨‍💻

DEV Community 👩‍💻👨‍💻 is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Zulfan Hameed
Zulfan Hameed

Posted on • Updated on

All Reserved keywords in JavaScript

The spec for ECMAScript 2020 says:

A reserved word is an IdentifierName that cannot be used as an identifier.

These are the reserved keywords specified in ECMAScript 2020:

break case catch class const continue debugger default delete do else
export extends false finally for function if import in instanceof new
null return super switch this throw true try typeof var void while with

Keywords which are reserved only in certain contexts:

await yield

Keywords which are reserved only if strict mode is on:

arguments eval let static

There are a few keywords which are not currently used in the spec but are set aside for use as a reserved keyword in future specifications, they are:

enum implements interface package private protected public

Apart from the above there global properties which act as reserved keywords. These are read-only or immutable in global scope:

Infinity NaN undefined

There are also a few keywords like async which are not reserved and can be used as identifiers.

Fin.


Next post is going to be about strict mode in javascript.
I have taken up a challenge to post good-to-know stuff in JS for thirty days. Please follow me @zlfnhmd for updates and to show some love❤️❤️❤️

Top comments (0)

This post blew up on DEV in 2020:

js visualized

🚀⚙️ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! 🥳

Happy coding!