QUESTIONS- 1. Create and array of objects named movies . Each of the objects in the array will represent a movie. Each object should have properties for: movie title release year rating (your rating 1 - 10) genres (an array of genres. eg ["Drama", "Mystery", "Sci-Fi", "Western"] ) The array should contain at least 5 of movies you have seen (choose your own movies) You do not need to use JSON to create this array You can use IMDB if you need help finding the info for your movie 2. Now that digital format is taking over, we would like to add a property to each object for the format (“film” or “digital”). The property will be called format . Assuming that all movies in our data set where shot on film, use .forEach() to add the property and set a value of “film” for each movie. 3. Use the .map() method to create an array of movie titles from our initial data set named movieTitles . 4. Use the .reduce() method to find the highest and lowest rated movies in the data set. Store these objects in variables named highestRated and lowestRated . 5. Use the .filter() method to create an array of movies that have a rating of 7 or higher. Store this array in a variable named highlyRated . 6. Display the following in the console with text to describe each value: The title of each movie (hint: .join() to make it look nicer) The highest rated movie title and rating The lowest rated movie title and rating The titles of movies that have a rating of 7 or more (Hint: you may want to add a .map() when you output) Sample output: Movie titles: Blade Runner 2049, Blade Runner, Spectre, The Golden Compass, Sherlock Holmes Highest rated: Blade Runner (9) Lowest rated: The Golden Compass (5) Highly rated: Blade Runner 2049, Blade Runner, Spectre, Sherlock Holmes

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

QUESTIONS-

1. Create and array of objects named movies . Each of the objects in the array will represent a movie.
Each object should have properties for:
movie title
release year
rating (your rating 1 - 10)
genres (an array of genres. eg ["Drama", "Mystery", "Sci-Fi", "Western"] )
The array should contain at least 5 of movies you have seen (choose your own movies)
You do not need to use JSON to create this array
You can use IMDB if you need help finding the info for your movie
2. Now that digital format is taking over, we would like to add a property to each object for the format (“film” or
“digital”). The property will be called format . Assuming that all movies in our data set where shot on film, use
.forEach() to add the property and set a value of “film” for each movie.
3. Use the .map() method to create an array of movie titles from our initial data set named movieTitles .
4. Use the .reduce() method to find the highest and lowest rated movies in the data set. Store these objects in
variables named highestRated and lowestRated .
5. Use the .filter() method to create an array of movies that have a rating of 7 or higher. Store this array in a
variable named highlyRated .
6. Display the following in the console with text to describe each value:
The title of each movie (hint: .join() to make it look nicer)
The highest rated movie title and rating
The lowest rated movie title and rating
The titles of movies that have a rating of 7 or more (Hint: you may want to add a .map() when you output)
Sample output:
Movie titles: Blade Runner 2049, Blade Runner, Spectre, The Golden Compass, Sherlock Holmes
Highest rated: Blade Runner (9)
Lowest rated: The Golden Compass (5)
Highly rated: Blade Runner 2049, Blade Runner, Spectre, Sherlock Holmes

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education