"The closest thing you can achieve in JavaScript is fake operator
overloading – triggering two method calls: obj1.valueOf() obj2.
valueOf() Those are made because + only works with primitive
values and thus needs to convert obj1 and obj2 to primitives. It
does so by invoking their valueOf() method. Fake operator
overloading is much less useful than real operator overloading:
You don’t get access to both operands at the same time and you
can’t influence the value returned by + . We’ll later look at
tricks that work around these limitations"
- Fake operator overloading in JavaScript
http://r8.sharedcopy.com/5f99i