-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paper-Glenda Chicas #54
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work Glenda, you hit the learning goals here. It all works and you hit the essentials. I left a few suggestions, but they are minor. Well done.
</head> | ||
<body> | ||
<h1 id="h1t">Weater Report</h1> | ||
<h2 id="city_name_display">For the city of:</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably give this a default until the user enters a value in the input.
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (tempTrack<= 40){ | ||
gardenContainer.textContent = "❄️☃️🏔🌌🥶🎄🌲🥶🎄🌲❄️☃️🏔🌌🌲❄️🥶🎄"; | ||
} else if (tempTrack <= 60){ | ||
gardenContainer.textContent = "🐰🐣🦋🍀💐🌼🌞🐣🦋🍀💐🌼🌞🐰🦋🍀"; | ||
}else if (tempTrack > 65) { | ||
gardenContainer.textContent = "🌴🏞🍦🌊🌅🏝🌳🌹☀️🥭🍍🍸🌴🏞🍦🍍"; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note this section is repetitive. I suggest:
- Make a function simply to update the temp on the screen and change the containers.
- This function and
decreaseTemp
can then just change the state variable and call the function in step 1.
If you want to go further you could combine this function and decreaseTemp
into something like this:
const changeTemp = (increment) => {
tempTrack += increment;
changeTemp(tempTrack);
}
Then you can register the event handler with:
upArrow.addEventListener("click", () => changeTemp( +1 ) );
No description provided.