Exercise on the Reflect API
In this exercise, we will use various methods of the Reflect API to create and alter objects.
We'll cover the following
Exercise 1:
Create a Movie
class, and initialize the title
(String
) and movieLength
(Number
) properties in the constructor. Create a toString
method that prints the movie out using the following format:
${this.title} (${this.movieLength} minutes)
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.