JScript Reserved Keywords
JScript Tutorial |
Previous | Next
JScript has a number of reserved keywords. These words come in three types: JScript reserved keywords, future reserved words, and words to avoid.
JScript Keywords break false in this void continue for new true while delete function null typeof with else if return var
JScript Future Keywords case debugger export super catch default extends switch class do finally throw const enum import try
The words to avoid are any that are already the names of intrinsic JScript objects or functions. Words like String or parseInt are included in this.
Using any of the keywords from the first two categories causes a compilation error when your script is first loaded. Using a reserved word from the third set can cause odd behavior problems if you attempt to use both your variable and the original entity of the same name in the same script. For example, the following script does not do quite what you think it should:var String; var text = new String("This is a string object");
In this case, you get an error saying that String is not an object. Many cases of using a pre-existing identifier aren't this obvious.
© 1997 by Microsoft Corporation. All rights reserved.
|file: /Techref/inet/iis/jscript/htm/js739.htm, 4KB, , updated: 1997/9/30 04:45, local time: 2019/7/22 09:33,
|©2019 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.sxlist.com/techref/inet/iis/jscript/htm/js739.htm"> JScript Reserved Keywords</A>
|Did you find what you needed?|
Welcome to sxlist.com!
& kind contributors
just like you!
Please don't rip/copy
Copies of the site on CD
are available at minimal cost.
Welcome to www.sxlist.com!