-
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 - Katrina K #62
base: main
Are you sure you want to change the base?
Conversation
const randEmoji = () => { | ||
return emojiSelector[Math.floor(Math.random() * 5)]; | ||
} |
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.
Neat!
const changeTemp = (delta) => { | ||
state.temp += delta; | ||
const tempDisplay = document.querySelector("#tempDisplay"); | ||
tempDisplay.textContent = `${state.temp}`; | ||
} |
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.
Great helper function!
How could you add in the text color change here?
const updateCity = document.getElementById("cityPicker"); | ||
updateCity.addEventListener("change", cityUpdate); |
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.
This works, but there are multiple event types that can be used here that result in different behavior. The change
event doesn't trigger unless user presses enter
, while the input
event will trigger every time the user inputs a character (https://www.w3schools.com/jsref/event_oninput.asp).
Great work on this project! Part of Wave 2 is missing, but there are some additional enhancements. This project is green! |
No description provided.