By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

"enum" is a reserved word in JScript

P: n/a
VK
Just to realease my frustration:

innocent "enum" is a reserved word in JScript!

!@#$%^&*

I occasionally discovered it just before I got ready to smash my
computer over my head (some people would enjoy I guess ;-)

Maybe someone has her/his collection of "undocumented reserved words"
for JavaScript / JScript? Thus some identifiers which are not
officially prohibited but may lead to some bizzare results in some
bizzare (or not really) circumstances ?

Nov 28 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 28/11/2005 18:08, VK wrote:
Just to realease my frustration:

innocent "enum" is a reserved word in JScript!
That doesn't really come as a surprise. It's a future reserved word in
ECMAScript, too.

Perhaps your might want to refresh your memory of sections 7.5.2 and
7.5.3, as well as
<http://msdn.microsoft.com/library/en-us/script56/html/js56jsconreserved.asp>.
Alternatively, use a syntax highlighting editor that automatically marks
all of these.

[snip]
Maybe someone has her/his collection of "undocumented reserved words"
for JavaScript / JScript?


Other than properties that are clearly part of browser object models
(like document, etc.), what undocumented reserved words have you ever
come across? I don't recall any at the moment.

[snip]

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Nov 28 '05 #2

P: n/a
VK

Michael Winter wrote:
Perhaps your might want to refresh your memory of sections 7.5.2 and
7.5.3, as well as
<http://msdn.microsoft.com/library/en-us/script56/html/js56jsconreserved.asp>.


I be damned! I overlooked this little sucker in the list.

:-(

I guess I have to follow the advice I gave several times to others:
print this stuff out and keep right in front of myself.

Nov 28 '05 #3

P: n/a
VK wrote:
Just to realease my frustration:

innocent "enum" is a reserved word in JScript!

!@#$%^&*

I occasionally discovered it just before I got ready to smash my
computer over my head (some people would enjoy I guess ;-)


JSLint checks for stuff like this.

http://www.JSLint.com
Nov 29 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.