ES6 - Use Destructuring Assignment to Pass an Object as a Function's Parameters

Tell us what’s happening:
please help me to resolve the problem

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 = (stats) => (stats.max + stats.min) / 2.0;
const half = (stats) => { const {max, min} = stats; }
//const half = ({max, min}) => {};
// 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/112.0.0.0 Safari/537.36 Edg/112.0.1722.48

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

Link to the challenge:

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

  • you are destructuring it, but in “parameters” label, as it was shown in “examples”
  • this is how its intended for this “step”, now yo need to add them up and return

addres that change and it should be alright, happy learning :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.