Does the Rhino javascript engine consider byte a keyword?

I'm using the yui compressor and it fails to compile the following chunk of javascript.  Any ideas?

[ERROR] 43:11:missing name after . operator

Here is line 43
this.byte = this.bit = 0;

Thanks!
nategilmanAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
MorcalavinConnect With a Mentor Commented:
What version of rhino are you using?  byte is still in the reserved word list for backwards compatibility reason.  I don't think the ECMAscript specifications use it anymore.  These seems to work fine for me:
window.bit = 'bar';
window.byte = window.bit = 0;
alert(window.byte);

It may be that yui still doesn't allow byte for some reason.
0
 
HonorGodCommented:
What does it display for:

alert( typeof( byte ) )
0
 
MorcalavinConnect With a Mentor Commented:
byte is a reserved word in javascript.

http://javascript.about.com/library/blreserved.htm
0
 
HonorGodConnect With a Mentor Commented:
http://javascript.about.com/od/reference/g/rbyte.htm

... The plan to allow specific data types in Javascript no longer exists and byte is therefore no longer on the reserved word list in the latest standards. ...
0
 
HonorGodCommented:
Thanks for the assist, and the points.

Good luck & have a great day
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.