Destructuring in JavaScript

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)
// Only change code above this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3237.0 Safari/537.36.

Challenge: Use Destructuring Assignment to Pass an Object as a Function’s Parameters

Link to the challenge:

the body of the function was (stats.max + stats.min) / 2
aren’t you missing something?

1 Like

thanks a bunch
let me reset

I don’t think you need to reset, you just need to return the average of the two numbers

Thankyou. I do appreciate