"enum" is a reserved word in JScript

V

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 ?
 
M

Michael Winter

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
 
D

Douglas Crockford

VK said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top