3

Possible Duplicate:
Javascript syntax I haven’t seen till now, what does it do really?

Just saw http://github.com/tobeytailor/def.js today, and I don't understand how this works:

def ("Ninja") << Person ({
    init: function(name){
        this._super();
    },

    kick: function(){
        this.speak("I kick u!");
    }
});

Looking through the code for def.js, I don't see anything mentioning the << operator. How is this pseudo operator overloading happening?

Community
  • 1
  • 1
Jamie Wong
  • 18,104
  • 8
  • 63
  • 81
  • 3
    possible duplicate of [Javascript syntax I haven't seen till now, what does it do really?](http://stackoverflow.com/questions/3245639/javascript-syntax-i-havent-seen-till-now-what-does-it-do-really). Answered in that question as well, see the edit and comments on the accepted answer. – Andy E Jul 15 '10 at 13:28
  • 1
    Thanks, didn't see that when posting. voted to close. – Jamie Wong Jul 15 '10 at 14:00

0 Answers0