Right. I totally forgot that...
So I have to keep only two operands per operator.
Thank you for answering :)

On Sat, Oct 1, 2011 at 12:48 AM, Poetro <[email protected]> wrote:
> The + operator is not just for numbers and can have sideeffects, if
> the operands have different types or the operands are not numbers or
> strings (and even in that case). This makes the + operator tricky.
>
>>>> "boo" + 1 + 2
> "boo12"
>>>> 1 + 2 + "boo"
> "3boo"
>
>>>> var a = {toString: function () { return 1; }, valueOf: function () { 
>>>> return 2; }}, b = 0; a + b
> 2
>
> --
> Poetro
>
> --
> 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