scrimba
Learn Modern JavaScript
Use Destructuring Assignment to Assign Variables from Nested Objects
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Use Destructuring Assignment to Assign Variables from Nested Objects
AboutCommentsNotes
Use Destructuring Assignment to Assign Variables from Nested Objects
Expand for more info
index.js
run
preview
console
const LOCAL_FORECAST = {
today: { min: 72, max: 83 },
tomorrow: { min: 73.3, max: 84.6 }
};

function getMaxOfTmrw(forecast) {
"use strict";

const maxOfTomorrow = undefined;

return maxOfTomorrow;
}

console.log(getMaxOfTmrw(LOCAL_FORECAST));
Console
null
,
index.html
-1:33