Exercise 2: Finding the Type of Triangle
In this exercise, you will implement class-based inheritance using the two constructor function Shape and Triangle.
Problem Statement
In this exercise, two constructor functions, Shape
and Triangle
are declared. You need to implement class-based inheritance such that the class Triangle
inherits prototype properties from the Shape
class.
You have to implement the following tasks:
Task 1
-
Pass the parameters
name
andsides
...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy