...
Solution Review: Inheritance Check
This lesson will explain the solution to the problem in the previous lesson.
class Vehicle { constructor() { var speed = "100"; var model = "Tesla"; }}class Car { constructor() { var speed = "100"; var model = "Tesla"; }}var car = new Car();function check() { if (!(car instanceof Vehicle)) { console.log("Inheritance not implemented"); } else { console.log("Good job"); }}check();
In the given problem, we can see that the student ...