Ok, we are on the same page for expression AExpr || BExpr as I
mentioned before. But what about: AExpr || (BExpr)
Do you by implication mean that these two are the same? I mean are
AExpr || BExpr and AExpr || (BExpr) treated equally?

On Nov 7, 1:50 pm, Arian Stolwijk <[email protected]> wrote:
> From the ES5 specs:http://es5.github.com/#x11.11
>
> The production *LogicalORExpression* *:* *LogicalORExpression* *||* *
> LogicalANDExpression* is evaluated as follows:
>
>    1.
>
>    Let *lref* be the result of evaluating *LogicalORExpression*.
>    2.
>
>    Let *lval* be GetValue <http://es5.github.com/#x8.7.1>(*lref*).
>    3.
>
>    If ToBoolean <http://es5.github.com/#x9.2>(*lval*) is *true*, return *
>    lval*.
>    4.
>
>    Let *rref* be the result of evaluating *LogicalANDExpression*.
>    5.
>
>    Return GetValue <http://es5.github.com/#x8.7.1>(*rref*).
>
> So basically it is: Ok, we have a OR operator, with two sides: AExpr ||
> BExpr
> Only if the boolean value of the evaluated value of AExpr is false,
> evaluate the right hand side BExpr.
>
> I replied with the bitwise operator just to illustrate the difference
> between the logical and bitwise OR operators.
>
>
>
>
>
>
>
> On Mon, Nov 7, 2011 at 11:32 AM, HankyPanky <[email protected]> wrote:
> > Arian,
>
> > Thanks man for you reply, but bitwise operator isn't the case, I am
> > specifically talking about logical OR.
>
> > --
> > To view archived discussions from the original JSMentors Mailman list:
> > http://www.mail-archive.com/[email protected]/
>
> > To search via a non-Google archive, visit here:
> >http://www.mail-archive.com/[email protected]/
>
> > To unsubscribe from this group, send email to
> > [email protected]

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to