Extend the blueprint
Build your first JetBot child instance.
Blueprint Lab taught you to stamp many robots from one class. Today, build a new blueprint on top of it. The child class inherits the robot's skills, then adds a superpower of its own!
A child class can inherit properties and methods from a parent class. That means less repeated code and specialized objects that still share the same foundation.
speak() works without rewriting it.Think of it as: Robot β SuperBot. Every SuperBot is a Robot, but not every Robot has a jetpack!
Build your first JetBot child instance.
Use the inherited speak() method.
Trigger a power method unique to the child class.
Create two different child-class types.
Train three bot types and compare their custom moves.
extends makes one class inherit from another.super() calls the parent constructor.