Update use-destructuring-assignment-to-assign-variables-from-objects.english.md

This commit is contained in:
Prabhat Kumar Sahu
2018-10-14 11:32:55 +05:30
committed by Kristofer Koishigawa
parent 6f09033346
commit c9a8b38ed3

View File

@ -68,6 +68,19 @@ console.log(getTempOfTmrw(AVG_TEMPERATURES)); // should be 79
<section id='solution'>
```js
// solution required
const AVG_TEMPERATURES = {
today: 77.5,
tomorrow: 79
};
function getTempOfTmrw(avgTemperatures) {
"use strict";
// change code below this line
const {tomorrow:tempOfTomorrow} = avgTemperatures; // change this line
// change code above this line
return tempOfTomorrow;
}
console.log(getTempOfTmrw(AVG_TEMPERATURES)); // should be 79
```
</section>