Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Paper-Glenda Chicas #54

wants to merge 7 commits into from

Conversation

GClenda
Copy link

@GClenda GClenda commented Jun 16, 2021

No description provided.

Copy link

@CheezItMan CheezItMan left a 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>

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.

Comment on lines +65 to +68




Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment on lines +7 to +13
if (tempTrack<= 40){
gardenContainer.textContent = "❄️☃️🏔🌌🥶🎄🌲🥶🎄🌲❄️☃️🏔🌌🌲❄️🥶🎄";
} else if (tempTrack <= 60){
gardenContainer.textContent = "🐰🐣🦋🍀💐🌼🌞🐣🦋🍀💐🌼🌞🐰🦋🍀";
}else if (tempTrack > 65) {
gardenContainer.textContent = "🌴🏞🍦🌊🌅🏝🌳🌹☀️🥭🍍🍸🌴🏞🍦🍍";
}

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:

  1. Make a function simply to update the temp on the screen and change the containers.
  2. 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 ) );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants