ES6: Challenge Destruct to Assign Var from Obj buggy?

Hi. I have tried to complete this challenge a few different ways but I ultimately end up with the same result:
// running tests
destructuring with reassignment was used
// tests completed
I ran through the code using Chrome dev tools as well, and the console printed 79, with no errors (screen shot). I ran into this issue with a previous challenge and so I followed the same suggestions (clear cache, cookies, reload browser) but nothing helped. What am I missing or doing wrong?

Does this work? :
const { tomorrow : avgTemperatures.tomorrow } = tempOfTomorrow

I get a syntax error:

SyntaxError: unknown: Unexpected token, expected , (10:36)
8 | // change code below this line
9 | // const {tomorrow : tempOfTomorrow} = AVG_TEMPERATURES;

10 | const { tomorrow : avgTemperatures.tomorrow } = tempOfTomorrow // change this line
| ^
11 | // change code above this line
12 | return tempOfTomorrow;
13 | }

Does it work for you?

I hadn’t tried it. Let me get back to you

This should work:
const { tomorrow : tempOfTomorrow } = avgTemperatures;

1 Like

Thank you! I don’t understand why that works but I am happy I can move on with my life. I was about ready to punch my machine in its interface.

1 Like

because you have “use strict” every line has to end with a ;

Hi. I tired it with and without the semicolon; I tried it several different ways with the same result.

1 Like

Ah maybe because you passed it in lowercase and tried to reference it uppercase.