Design comparison
SolutionDesign
Solution retrospective
After solving the code, i discovered when my input value is on 0.00, amount section reads Nan. how can i rectify this
Community feedback
- @oliveridsPosted almost 3 years ago
That's probably because you coded it for the calculation to be done at every change in the input's value. You can fix this by only executing the calculating function after you notice the input isn't empty. An if condition sounds enough, something like "if(input.value.length !== 0)".
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin 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