In Firefox/Spidermonkey (and every other browser I've tried, and in
node.js):

    var x = 3, y = x || 15;

After that, "y" will contain the number 3.

In Rhino (via JDK6; version 1.6.2 I think it is):

    var x = 3, y = x || 15;

After that, "y" will contain the "true" constant.

I don't understand how the Rhino interpretation there can be correct, but
I'm not a Language Lawyer. Is this a known "thing" with Rhino?  Is it an
example of a more general class of differences in language interpretation?

Thanks.

-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to