Correct solutoin for Use Destructuring Assignment to Paass and Object as a Function's Parameters not passing

Actually i think there may be a bug, with this challenge
Ive spent hours on it

const half = ({max, min}) => (max + min) / 2.0;

const half  = ({max, min}) => {return (max +min) /2.0;}

and other solutions dont work…

if you or someone can let contributors or other team members know

test case 4 of 4 wont pass, but the first 3 do
“Destructured parameter should be used.”

Your post was moved to a separate topic, since your reply was not relevant to the other thread’s topic.

Can you post a screenshot showing the full code you are using and the tests which do not pass?

Also, can you tell us what browser and version you are using with the curriculum?

Hey Randall ok thanks, I am running chrome 81.0.4000.3 (Official Build) dev (64-bit)
I couldnt share my work early this morning because it was .pdf screenshot …

but here is another go at the challenge

The issue/bug (which I am going to fix on this and about 100 other JavaScript challenges), is that the test does not ignore the commented code and thinks you are not destructuring. I was thinking that might be the issue, but until I could see all the code in the editor, I did not want to jump to that conclusion.

For now, just remove the commented code and you will pass.


thanks for the fast reply Randell :+1: :+1:


Thank you. I can’t believe I spent so long on this thinking I just didn’t understand what I was doing wrong.

Note to self - delete comments from now on :unamused: