An identifier in JavaScript is a name used to refer to something else. That is, it is a variable or function name. The rules for legal identifier names are the same in JavaScript as they are in most languages. The first character must be a letter (lowercase or uppercase) or an underscore (_). Subsequent characters may be any letter or digit or an underscore. (Numbers are not allowed as the first character so that JavaScript can easily distinguish identifiers from numbers.) These are legal identifiers:
i my_variable_name v13 _dummy
In Navigator 3.0, the $ character is also legal in JavaScript identifiers, in any position including the first. This change was made for compatibility with Java identifiers. Therefore, in Navigator 3.0 scripts, the variable names in the following assignments are also legal:
A$ =index.html "I'm a BASIC programmer"; $VMS = true;
Internet Explorer 3.0 does not support $ in identifier names, but a future version of the language will.
file: /Techref/language/java/script/definitive/ch02_06.htm, 4KB, , updated: 2019/10/14 15:00, local time: 2024/12/26 23:03,
3.148.112.15:LOG IN
|
©2024 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://linistepper.com/techref/language/java/script/definitive/ch02_06.htm"> [Chapter 2] 2.6 Identifiers</A> |
Did you find what you needed? |