Question
I NEED JAVASCRIPT PROGRAM Notes : Do not concatenate strings, use template literals you do not need to prompt for values, just enter them in
I NEED JAVASCRIPT PROGRAM
Notes
: Do not concatenate strings,
use template literals you do not need to prompt for values,
just enter them in the array have at least 4 quiz 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 not include any HTML tags do not use the document.
writeSave your code to a file called as3a.js (please use lowercase)
* INSTRUCTION :
1. Create an array of at least 4 objects named quizzes. Each of the objects in the array will represent a single quiz.
Each object should have properties for:
quiz name (string)
mark earned (number)
total marks possible (number) Use different values for this, don't just make them all out of the same mark
.2. Use the .forEach() method to add a property "percent" to each quiz object.
3. Use the .sort() method to sort the array from highest percentage to lowest.
4. Each quiz is weighted equally. Calculate the average of all the percent properties using the. reduce() method.
5. Output each quiz name and percent, rounded to an integer, on a separate line per quiz. Do this without using a loop.
6. Output the final average percent, shown to one decimal place, with some descriptive text.
Sample Output:
Quiz 3 40%
Quiz 1 75%
Quiz 2 83%
Quiz 4 90%
Quiz average: 72.1%
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