Question: 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

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

1 Expert Approved Answer
Step: 1 Unlock

function academicNotesnotes if typeof notes object ArrayisArraynotes Objectkeysnoteslength 0 throw n... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!