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

Tell us what’s happening:
this is more a question on why the description of the challenge was written the way it was.

both examples of code given:
const profileUpdate = (profileData) => {
_ const { name, age, nationality, location } = profileData;_
_ // do something with these variables_
_ }_

_ const profileUpdate = ({ name, age, nationality, location }) => {_
_ /* do something with these fields */_
_ }_

involve => style syntax, which you can’t use to solve the problem. Shouldn’t the examples involve the syntax we are supposed to be learning? In this case how to pass only the pertinent parts of an object to a particular function. my code works, but getting to it involved google, reading the description didn’t help much.

if I’m mistaken and there is a way to write this using =>, please let me know. thanks!
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
};
const half = (function() {
  "use strict"; // do not change this line

  // change code below this line
 return function half({max, min}) {
   
    // use function argument destructuring
    return (max+ min) /2;
  };
  // change code above this line

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

//const {tomorrow : {max: maxOfTomorrow}} = forecast;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters

fair enough, thanks for the response.