Tell us what’s happening:
Your code so far
const stats = {
max: 56.78,
standard_deviation: 4.34,
median: 34.54,
mode: 23.87,
min: -0.75,
average: 35.85
};
// Only change code below this line
const half = ({max, min}) => (max + min) // 2.0;
// Only change code above this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36
.
Challenge: Use Destructuring Assignment to Pass an Object as a Function’s Parameters
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
ilenia
January 21, 2021, 10:32pm
2
the average is half of the sum, you are returning the sum without dividing by 2
You’ll kick yourself when you see it! You’ve commented out your divisor - you just need to take out one of those slashes before the 2 and it’ll work fine
system
Closed
July 25, 2021, 6:52am
4
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.