Tell us what’s happening:
The first test “You should remove the ES5 assignment syntax.” produces somewhat odd results, because it fails, when you comment out the ES5 code. You have to actually delete the characters to make it pass. Maybe that could be edited.
Would this be better as a GitHub issue? I have never created an issue …
https://github.com/freeCodeCamp/freeCodeCamp/blob/master/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-extract-values-from-objects.english.md
Your code so far
const HIGH_TEMPERATURES = {
yesterday: 75,
today: 77,
tomorrow: 80
};
// change code below this line
let { today, tomorrow} = HIGH_TEMPERATURES;
//const today = HIGH_TEMPERATURES.today;
//const tomorrow = HIGH_TEMPERATURES.tomorrow;
// change code above this line
console.log(yesterday) // should be not defined
console.log(today); // should be 77
console.log(tomorrow); // should be 80
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:72.0) Gecko/20100101 Firefox/72.0
.
Challenge: Use Destructuring Assignment to Extract Values from Objects
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-extract-values-from-objects