Home >Web Front-end >JS Tutorial >Javascript Basic Tutorial Summary of Keywords and Reserved Words_Basic Knowledge

Javascript Basic Tutorial Summary of Keywords and Reserved Words_Basic Knowledge

WBOY
WBOYOriginal
2016-05-16 16:19:381091browse

Keywords cannot be used as variable names or function names

Copy code The code is as follows:

break
case
catch
continue
default
delete
do
else
finally
for
function
if
in
instanceof
new
return
switch
this
throw
try
typeof
var
void
while
with

Reserved words are reserved for future keywords

also cannot be used as a variable or function name.

Copy code The code is as follows:

abstract
boolean
byte
char
class
const
debugger
double
enum
export
extends
final
float
goto
implements
import
int
interface
long
native
package
private
protected
public
short
static
super
synchronized
throws
transient
volatile

When defining variables, do not use keywords or reserved words, otherwise some inexplicable situations will occur.

Statement:
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