Keywords and reserved words in JavaScript

Source: Internet
Author: User

ECMA-262 describes a set of keywords that can be used to represent the start or end of a control statement, or to perform a specific operation. Rule: Keywords belong to language reservations and cannot be used for identifiers.

All ECMAScript Keywords (* New for fifth edition):

Break does instanceof typeof case Else new Var catch finally return void continue for switch while Deb ugger* function this with the default if throw delete in try

All reserved words in ECMA-262 (third edition):

abstract enum int short Boolean export interface static byte extends long Super Char final native class

Synchronized float package throws const GOTO private Transient debugger implements protected volatile double

Import public

Reserved words may be reprinted as keywords, such as the fifth version of the new debugger is the third edition of the reserved word.

Reserved words in the fifth edition of non-strict mode:

class Enum extends supper const Export Import

Reserved words in strict mode:

Implements package public interface private static let protected yield

Note: Let and yield are new reserved words, and to ensure compatibility recommendations as reference reserved words.

Using keywords and reserved words in JavaScript can be an error. It is not recommended!

Keywords and reserved words in JavaScript

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.