You are viewing a single comment's thread. Return to all comments →
If we dont use second parameter in Square, there is no need to overload parent's constructor:
class Square extends Rectangle{ area = function(){ return this.w * this.w } }
But I presume such magic works only in JavaScript :)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 5: Inheritance
You are viewing a single comment's thread. Return to all comments →
If we dont use second parameter in Square, there is no need to overload parent's constructor:
But I presume such magic works only in JavaScript :)