Exercise 2: Instance Type
Let’s practice managing instance types in JavaScript.
We'll cover the following
Problem statement
Complete the code so it produces the desired result, using the modern JavaScript conventions.
Sample input and output
Call | Output |
---|---|
derived1.copy() |
Base {} |
derived2.copy() |
Derived2 {} |
Exercise
Complete this exercise to test your knowledge of managing instance types. The solution to this challenge is given in the next lesson, but we want you to try it yourself first.
Get hands-on with 1400+ tech skills courses.