I need some explaining please

Tell us what’s happening:
Describe your issue in detail here.

  **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, min, max}) => {
}

// Only change code above this line
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

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

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

im having trouble with Destructuring Assignment

What part are you having trouble with?

What do the failing tests say?

What have you tried?

what parts are there
"please tell me "

Sorry, we don’t just hand out answers here. But if you talk with us, we’re more than happy to help you work towards the solution.

or must i search it on google?

im not talking about answers

If you only want to copy someone else’s work, you will have to look elsewhere. If you would like help writing the solution yourself, then we can help.

What part of this question are you having trouble with?

What have you tried?

const half = ({stats, stats.min, stats.max}) => {}

There isn’t anything inside of this function.

I’m sorry, but you aren’t really answering my questions at all. I don’t know how to help you.

what is wrong with my code

You didn’t put anything inside of your function. If you put absolutely nothing inside of a function, it will do absolutely nothing.

now we getting some where so it should be:

const half = ({stats, min, max}) => { stats.min, stats.max}

Why do you think the function should be like that? Does it work if you try that?

you not being helpful

I will not just give you the answer. I am asking you questions about your code so we can talk about what you are trying to do. I have no way of knowing what you are thinking about unless you tell me.

So…

Why did you change the function in that way?

Why did you add stats to the argument list in that way? Why are you referencing stats inside of the function in that way?

The lesson is about destructuring (taking apart) the stats object in the arguments of your function and using the properties (or pieces) of that object to compute the half value.

i going to start over with javascript

You can do that if you like. I don’t know enough about your level of understanding to know if this is a good idea for you or not.

But when you ask for help, it really is important for you actually talk to the person who is trying to help you. We can’t know what you are thinking unless you talk with us.

yes sir, thanks for the tips