Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function that receives a key-value pair (for example: 3.5: 40 ) where the key (in this case: 3.5) is the note and
Write a function that receives a key-value pair (for example: 3.5: 40 ) where the key (in this case: 3.5) is the note and the value (in this case: 48) is the percentage of the respective note. The function returns an object with two properties: Hints Since the notes and percentages are entered in an object, the notes (keys) must all be different. . You can use console.log to debug the output from your solution. Requirements The function accepts an object that cannot be empty. Arrays are not allowed. Keys or values that are null, undefined or empty are not allowed. . accumulated Percentage equal to the sum of all percantages (values) accumulatedNote equal to the sum of products of each note and its corresponding percentage (key-value pairs) Make sure that the input entered is fully correct with the validations needed. . A key must be a number in the range 10.5] (0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
function academicNotesnotes if typeof notes object ArrayisArraynotes Objectkeysnoteslength 0 throw n...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