Using Reserved Words to coding in Javascript/JS

This JavaScript tutorial explains all about reserved phrases in JavaScript with examples.


There are reserved words that have one-of-a-kind that means in JavaScript and can now not be used in your code as variables, feature names or loop labels.

It is important to observe that JavaScript is a case-sensitive language (whereas HTML is not case-sensitive). As a result, you may additionally notice uppercase letters inside some of the JavaScript reserved words listed below.

Reserved Words

Here is a listing of reserved phrases (and phrases to avoid) in JavaScript:

abstract boolean break byte case catch char class continue const debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void while with

Other Reserved Words to Avoid

Here is a listing of phrases to keep away from that are are used as names of properties, methods and consructors in JavaScript. You have to additionally attempt now not to use these names as you danger overwriting present functionality in JavaScript:

alert arguments Array blur Boolean callee caller captureEvents clearInterval clearTimeout close closed confirm constructor Date defaultStatus document escape eval find focus frames Function history home Infinity innerHeight innerWidth isFinite isNaN java length location locationbar Math menubar moveBy name NaN netscape Number Object open opener outerHeight outerWidth Packages pageXOffset pageYOffset parent parseFloat parseInt personalbar print prompt prototype RegExp releaseEvents resizeBy resizeTo routeEvent scroll scrollbars scrollBy scrollTo self setInterval setTimeout status statusbar stop String toolbar top toString unescape unwatch valueOf watch window