Open In App
Related Articles

JavaScript | Reserved Words

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
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

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!


Last Updated : 24 Mar, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials