Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Discovering Advanced Algebra An Investigative Approach

Authors: Jerald Murdock, Ellen Kamischke, Eric Kamischke

1st edition

1559539844, 978-1604400069, 1604400064, 978-1559539845

More Books

Students also viewed these Programming questions