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

JavaScript Enhancement Tutorial - Reserved Keywords

巴扎黑
Release: 2016-11-25 13:32:48
Original
874 people have browsed it

This article is the official HTML5 training tutorial of H5EDU organization. It mainly introduces: JavaScript enhancement tutorial - reserved keywords

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

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template