Skip to content

Latest commit

 

History

History

02_Movie-Object

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Movie Object

What You'll Do

Create a Movie object that takes in five arguments:

  • title
  • director
  • genre
  • releaseYear
  • rating

Add a function called getOverview on the Movie prototype which console logs the following overview for each film:

"<movie>, a <genre> film directed by <director> was released in <releaseYear>. It received a rating of <rating>."

Requirements

  • Use object prototypes

Output

Movie {
  title: 'Spiderman',
  director: 'Sam Raimi',
  genre: 'Action',
  releaseYear: 2002,
  rating: 87
}
Spiderman, a Action film directed by Sam Raimi was released in 2002. It received a rating of 87
The Dark Knight, a Action film directed by Christopher Nolan was released in 2008. It received a rating of 83
The Notebook, a Romance film directed by Nick Cassavetes was released in 2004. It received a rating of 54