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...
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)
Press + to interact
class Movie {constructor( title, movieLength ) {//Write your code here}toString() {return "Your Answer";}};
Exercise 2:
Use Reflect.apply
to call the ...