On 11/07/2011 02:28 AM, HankyPanky wrote:
> Thanks Mike for your time,
>
> To say the leas, I know of this short-circuit evaluation, but don't
> forget that parentheses are there to modify the sequence of
> evaluation, and in this case (myVar = 'Hello there') is supposed to
> happen first.
>
That's not true.  Parenthesis only affect the order of evaluation of the
things inside of them.  With the logical or, that's not even looked at
until/if the left side evaluates to false.  You can't change the order
of the evaluation of an || by putting a higher precedent thing on the
right.  || ALWAYS evaluates left to right, not highest precedent and
lower precedent.

Patrick

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