Which are javascript reserved words?

You should avoid using these reserved words and keywords as function or variable names as JavaScript has reserved these words for its own use.

JavaScript Reserved Words
break export return
case for switch
comment function this
continue if typeof
default import var
delete in void
do label while
else new with
Java Keywords (Reserved by JavaScript)
abstract implements protected
boolean instanceOf public
byte int short
char interface static
double long synchronized
false native throws
final null transient
float package true
goto private  
ECMAScipt Reserved Words
catch enum throw
class extends try
const finally  
debugger super  
Other JavaScript Keywords
alert isFinite personalbar
Anchor isNan Plugin
Area java print
arguments JavaArray prompt
Array JavaClass prototype
assign JavaObject Radio
blur JavaPackage ref
Boolean length RegExp
Button Link releaseEvents
callee location Reset
caller Location resizeBy
captureEvents locationbar resizeTo
Checkbox Math routeEvent
clearInterval menubar scroll
clearTimeout MimeType scrollbars
close moveBy scrollBy
closed moveTo scrollTo
confirm name Select
constructor NaN self
Date navigate setInterval
defaultStatus navigator setTimeout
document Navigator status
Document netscape statusbar
Element Number stop
escape Object String
eval onBlur Submit
FileUpload onError sun
find onFocus taint
focus onLoad Text
Form onUnload Textarea
Frame open toolbar
Frames opener top
Function Option toString
getClass outerHeight unescape
Hidden OuterWidth untaint
history Packages unwatch
History pageXoffset valueOf
home pageYoffset watch
Image parent window
Infinity parseFloat Window
InnerHeight parseInt  
InnerWidth Password  

This section contains a list of all keywords that are reserved in JavaScript.

What are Reserved Keywords?

JavaScript has a number of reserved keywords. These are the words that you cannot use as identifiers (variable names, function names, and loop labels) in your JavaScript programs.

Reserved Keywords in ECMAScript 5 (ES5)

The following list shows the keywords that are reserved in ECMAScript 5. It also includes keywords that are reserved for future as well as keywords that are disallowed in strict mode.

arguments sm break case catch class fr const fr continue debugger default delete do else enum fr eval sm export fr extends fr false finally for function if implements sm import fr in instanceof interface sm let sm new null package sm private sm protected sm public sm return static sm super fr switch this throw true try typeof var void while with yield sm

Note: The keywords arguments and eval are not strictly reserved keywords, but they are treated like keywords in strict mode, so they cannot be used as identifiers. Additionally, the keywords null, true, and false cannot be used as identifiers in ECMAScript.


Reserved Keywords in ECMAScript 6 (ES6)

The following list shows the keywords that are reserved in ECMAScript 6. It also includes keywords that are reserved for future as well as keywords that are disallowed in strict mode.

arguments sm await break case catch class const continue debugger default delete do else enum fr eval sm export extends false finally for function if implements sm import in instanceof interface sm let sm new null package sm private sm protected sm public sm return static sm super switch this throw true try typeof var void while with yield


Future Reserved Keywords in Older Standards

The following list shows the keywords that were reserved as future keywords by the older ECMAScript specifications (before ECMAScript 5 or ES5).

abstract boolean byte char double final float goto int long native short synchronized throws transient volatile

Note: For optimal backwards compatibility, you should better avoid using all the keywords shown on this page as variable names or property names in your JavaScript code.

How many reserved words are in JavaScript?

The spec describes four groups of reserved words: keywords, future reserved words, null literals and boolean literals.

Is array a reserved word in JavaScript?

Some SPECIAL words such as Object , Array , Function , Method , Number etc are not belong to keywords in Javascrpt: Reserved Keywords in Javascript.

What are keywords reserved words?

keyword, - a word with special meaning in a particular context. It's semantic definition. reserved word is a word that cannot be used as an identifier - such as, variable, and function name.

Which of the following are JavaScript reserved words Mcq?

byte is reserved word in Javascript? Explanation: Yes, byte is reserved word in Javascript.