var p = function () { this.show = function () { alert('hello world!!!'); } } p.prototype.show = function() { alert('haha'); } var o = new p(); o.show();
It alerts "hello world!!!" why?
Can I modify the prototype of the method, if so, how?
javascript inheritance prototype
smilexu
source share