Extends

Extends
πŸ‘¨β€πŸ’Ό Let's build a shape hierarchy. We'll create a base Shape class and extend it with specific shapes like Circle and Rectangle.
🐨 Open
index.ts
and:
  1. Create a Shape base class with a color field
  2. Create a Circle class that extends Shape
  3. Add a radius field to Circle
  4. Create a Rectangle class that extends Shape
  5. Add width and height fields to Rectangle

Please set the playground first

Loading "Extends"
Loading "Extends"