let today = 'wednesday';
let weather = {
monday: 'sunny',
tuesday: 'rainy',
wednesday: 'sunny',
thursday: 'snowy',
friday: 'windy
};
-
(without coding first), what do you think will happen if we try to console out
weather[monday]
? -
The weather forecast has changed! Change the weather on friday from
"windy"
to"snowy"
. -
Change the variable
today
to today's day. Use this variable to console out the weather for today. -
Write a function to console out the weather for each day.
// Eg: "On Monday, it will be sunny. On Tuesday, it will be Rainy... etc"
-
Change the previous function to console out the weather for each day, but include today.
//Eg: "Today it will be sunny. On Tuesday, it will be rainy, etc...