¡@

Home 

javascript Programming Glossary: shape.prototype

Why can't I call a prototyped method in Javascript?

http://stackoverflow.com/questions/12500637/why-cant-i-call-a-prototyped-method-in-javascript

Demo I have F which inherits from Shape. F.prototype Shape.prototype F creates new method with name test. F.prototype.test function.. return 'test' I understand that if I write F.prototype Shape.prototype all the methods which I create in F will be available by other.. errors when I execute the code alert B.test function Shape Shape.prototype.name 'shape' Shape.prototype.toString function return this.name..

What will be a good minimalistic Javascript inheritance method?

http://stackoverflow.com/questions/1404559/what-will-be-a-good-minimalistic-javascript-inheritance-method

and not instances function Shape x y this.x x this.y y Shape.prototype.draw function throw new Error 'Arbitrary shapes cannot be drawn'.. x y call super constructor this.side side inherit from `Shape.prototype` and not an actual instance Square.prototype clone Shape.prototype.. and not an actual instance Square.prototype clone Shape.prototype override `draw ` method Square.prototype.draw function gotoXY..