JavaScript note 3--identifiers and reserved words

Source: Internet
Author: User

1. Identifiers
JavaScript identifiers must begin with a letter, an underscore (_), or a dollar sign ($). Subsequent characters can be letters/numbers/underscores/dollar signs. You can also use non-English language or mathematical symbols to write identifiers;

2. Reserved words
break/delete/function/return/typeof/case/do/if/switch/var/catch/else/in/this/void/continue/false/instanceof/ throw/while/debugger/finally/
New/true/with/default/for/null/try

3.ECMASCRIPT5 retains the following keywords:
Class/const/enum/export/extends/import/super

4. Keywords in strict mode:
Implements/let/private/public/yield/interface/package/protected/static/arguments/eval

5.ECMASCRIPTS3 retains the following keywords:
abstract/double/goto/native/static/boolean/enum/implements/package/super/byte/export/import/private/ synchronized/char/extends/int/protected/throws/class/final/interface/public/transient/const/float/long/short/ Volatile

6. Predefined global variables and function names should be avoided by using the identifiers as their own:
Arguments/encodeuri/infinity/number/regexp/array/encodeuricomponent/isfinite/object/string/boolean/error/isnan /parsefloat/syntaxerror/date/eval/json/parseint/typeerror/decodeuri/evalerror/math/rangeerror/undefined/ Decodeuricomponent/function/nan/referenceerror/urierror

JavaScript note 3--identifiers and reserved words

Related Article

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.