Open In App

JavaScript Reserved Words

Last Updated : 19 Jun, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

In JavaScript, you cannot use these reserved words as variable names, label names, or function names.

Reserved Words

abstractargumentsbooleanbreakbyte
casecatchcharconstcontinue
debuggerdefaultdeletedodouble
elseevalfalsefinalfinally
floatforfunctiongotoif
implementsininstanceofintinterface
longnativenewnullpackage
privateprotectedpublicreturnshort
staticswitchsynchronizedthisthrow
throwstransienttruetrytypeof
varvoidvolatilewhilewith
yield    

Reserved Words added in ECMAScript 5 and 6

awaitsclassenumexport
extendsimportletsuper

Removed Reserved Words

The following reserved words have been removed from ECMAScript 5 and 6.

abstractbooleanbytechar
doublefinalfloatgoto
intlongnativeshort
synchronizedthrowstransientvolatile

Other Reserved Words

JavaScript can be used as the programming language in many applications.

alertallanchorareaanchors
assignblurbuttoncheckboxclearInterval
clearTimeoutclientInformationcloseclosedconfirm
constructorcryptodecodeURIdecodeURIComponentdefaultStatus
document elementelementsembedembeds
encodeURIencodeURIComponentescapeeventfileUpload
focusformformsframeinnerHeight
innerWidthlayerlinklocationmimeTypes
navigatenavigatorframesframeRate hidden
historyimageimagesoffscreenBufferingopen
openeroptionouterWidthouterHeightpackages
pageXOffsetpageYOffsetparentparseFloatparseInt
passwordpkcs11pluginpromptpropertyIsEnum
radioresetscreenXscreenYscroll
secureselectselfsetIntervalsetTimeout
statussubmittainttexttextarea

HTML Event Handlers

The name of all HTML event handlers  should not be used in javascript

onbluronclickonerror
onfocusonkeydownonkeypress
onkeyup onmouseoveronload
onmouseuponmousedownonsubmit

Next Article

Similar Reads