So couldn't you do in the constructor… this.constructor.prototype.sayHi=this.constructor.prototype.sayHi || function sayHi(){} Log in to Reply
this.constructor.prototype.sayHi=this.constructor.prototype.sayHi || function sayHi(){} Log in to Reply
Ha! Took C++ from you back in the 90's and still live in Columbia. Happened to stumble on this video. Cheers Log in to Reply
8 responses to “Javascript Classes and Inheritance Tutorial”
So couldn't you do in the constructor…
this.constructor.prototype.sayHi=this.constructor.prototype.sayHi || function sayHi(){}
this.constructor.prototype.sayHi=this.constructor.prototype.sayHi || function sayHi(){}
Ha! Took C++ from you back in the 90's and still live in Columbia. Happened to stumble on this video. Cheers
Very helpful video. Thanks!
First thing everyone says when they first learn this: "What?"
that was cool! thx!
I am using eclipse as the editor, and Chrome tools for debugging.
Thanks! What javascript editor are you using?