ES6: Use Destructuring Assignment to Pass an Object as a Function's Parameter

I do not know how to make it 28.015


const stats = {
  max: 56.78,
  standard_deviation: 4.34,
  median: 34.54,
  mode: 23.87,
  min: -0.75,
  average: 35.85
};

// change code below this line
const half  = ({  standard_deviation,mode }) => {

return standard_deviation+mode;

}
// change code above this line

console.log(stats); // should be object
console.log(half(stats)); // should be 28.015

You have invalid syntax here.

Why do you have / 2.0; after the {? What are you trying to do here?

The FCC console is telling you that you have a syntax error.

1 Like

I completed it. I am thankful for your help