We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
wanted to know can't we override the prototype methods like earlier I was trying to create area method in square class too and from there was eventually calling super.area() so as to idirectly call reactangle's area method.
Can someone please help me with any conceptual error which I am doing here?
Cookie support is required to access HackerRank
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 →
wanted to know can't we override the prototype methods like earlier I was trying to create area method in square class too and from there was eventually calling super.area() so as to idirectly call reactangle's area method. Can someone please help me with any conceptual error which I am doing here?