Tip Calculator App Main

Solution retrospective
I'm kinda confused when building this. Like when I add an event listener for user input, I can't instantly update the value that the user inputting, so that's why I call function instead reassign the variable each time event started. Mind tell me why is that? any feedback are welcome
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@palgramming
you should use number inputs so letters cannot be typed in the inputs https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number
- @RocTanweer
I would use buttons instead of divs for percentage options
- @aUnicornDev
The
e
passed below is the event object which has the latest updated value of the<input>
tag.inputPrice.addEventListener('input',(e)=>{ //Use e.target.value price(); })
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord