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 https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters
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.”

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.

2 Likes

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

OH MY GOD.

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: