@nullpuppy
Posted
I only really skimmed through the code, but looks good!
A couple things I noticed while poking around though: it looks like the only validation is checking if the number of people input is zero. I'm able to put in random text, and there's no errors presented. Same with the bill amount. I know it's not really clearly called out from what we're given for the challenge though, so maybe that's all ok.
Also, nothing gets calculated until focus is cleared from an input. You could register a handler for the 'input' event and get live updates!
@grgrnkoo
Posted
@nullpuppy thanks for your reply! yes, the main reason of such a poor validation is because of the task. i decided that the best i can do is follow the original instructions.
about the focus part. i’ll try to check other options of events. maybe ‘keydown’ should work better