DEV Community

Zulfan Hameed
Zulfan Hameed

Posted on • Edited on

3 1

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❤️❤️❤️

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay