Home Web Front-end JS Tutorial JavaScript Enhancement Tutorial - Reserved Keywords

JavaScript Enhancement Tutorial - Reserved Keywords

Dec 06, 2016 am 11:34 AM
html5

In JavaScript, some identifiers are reserved keywords and cannot be used as variable names or function names.
JavaScript Standards
All modern browsers fully support ECMAScript 3 (ES3, the third version of JavaScript, since 1999).
ECMAScript 4 (ES4) failed.
ECMAScript 5 (ES5, released in 2009), is the latest official version of JavaScript.
Over time, we are starting to see that all modern browsers have full support for ES5.
JavaScript reserved keywords
Javascript reserved keywords cannot be used as variable, label or function names. Some reserved keywords are used by Javascript for future extensions.
abstract arguments boolean break byte
case catch char class* const
continue debugger default delete do
double else enum* eval export*
extends* false final finally float
for function goto if implements
import* in instanceof int interface
let long native new null
package private protected public return
short static super* switch synchronized
this throw throws transient true
try typeof var void volatile
while with yield
* The keyword marked is newly added in ECMAScript5.
JavaScript objects, properties and methods

You should also avoid using the names of JavaScript built-in objects, properties and methods as JavaScript variable or function names:

Array Date eval function hasOwnProperty
Infinity isFinite isNaN isPrototypeOf length
Math NaN name Number Object
prototype String toString undefined valueOf
Java Reserved Keyword

JavaScript is often used with Java. There are some Java objects and properties that you should avoid using as JavaScript identifiers:

getClass java JavaArray javaClass JavaObject JavaPackage

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

Nested Table in HTML

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Table Border in HTML

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

HTML margin-left

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

HTML Table Layout

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Moving Text in HTML

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

HTML Ordered List

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

HTML onclick Button

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

HTML Input Placeholder

See all articles