Question
I NEED JAVASCRIPT PROGRAM Notes :Do not use the movie titles in the sample output Do not concatenate strings, use template literals Have at least
I NEED JAVASCRIPT PROGRAM
Notes
:Do not use the movie titles in the sample output
Do not concatenate strings,
use template literals
Have at least 6 movie objects in your array
You will not use any loops in your program
Submission Details
: Do not use the var keyword.
Instead, use let or const
Do not include any HTML tags
Do not use document.write
Save your code to a file called as3b.js (please use lowercase)
Sample Output:
(Don't use these titles in your assignment, use your own.)
Movie titles: Blade Runner, Sherlock Holmes, Spectre, Blade Runner 2049, Soul, The Golden Compass
Highest rated: Blade Runner (10)
Lowest rated: The Golden Compass (5)
Highly rated: Blade Runner, Sherlock Holmes, Spectre, Blade Runner 2049
1. Create and array of objects named movies. Each of the objects in the array will represent a movie.
The array should contain at least 6 movies you have seen (choose your own movies)
You can use IMDB.com if you need help finding the info for your movie
Each object should have properties for:
movie title (string)
release year (number)
rating (your rating, a number 1 - 10)
genres (an array of strings. eg ["Drama", "Mystery", "Sci-Fi", "Western"])
2. Now go back and add the property "format" with the value "digital" to a couple of the newer moviesin the array (but not all of them).
3. Now that digital format has taken over, we would like to add the "format" property to each object thatdoes not already have it. Use .forEach() to add the property "format" with a value of "film" for eachmovie that does not already have the property.
4. Use the .sort() method to sort the array of movies by rating, best to worst. Make sure that at leastone of your movies has a rating of 10.
5. Use the .map() method to create an array of movie titles from our initial data set namedmovieTitles.
6. Use the .reduce() method to find the highest and lowest rated movies in the data set. Store theseobjects in variables named highestRated and lowestRated.
7. Use the .filter() method to create an array of movies that have a rating of 7 or higher. Store thisarray in a variable named highlyRated.
8. Display the following in the console, using template literals, 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started