Design comparison
Solution retrospective
Hi guys, I would love to get reviews on the JS
Community feedback
- @ChamuMutezvaPosted almost 2 years ago
Hi UDOH Well done on your challenge. So far so good. Here are a few things that you can look at.
- Consider setting a maximum number of digits that your calculator can take - you can not have a calculator that will take any input as long as you press a key.
- try the following calculation
0.1 + 0.2
- i can enter
9......67....
as input, set conditions that you cannot enter more than one decimal point and the same applies to the operators eg a scenatio like98+-*
- You did well on the structure of the html , well done
One thing with tailwind is the bloating of your html making it difficult to read your html (just an opinion)
Marked as helpful1@Jey223Posted almost 2 years ago@ChamuMutezva Thank you so much. This was really helpful.
0 - @matusalab-devPosted almost 2 years ago
I didn't solve the challenge but from my perspective, refactor the toggle section by storing the color,background, and box-shadow because they're the same. in case you want to change the value of these properties, you have to go through each individual manually. they're not reusable. the second one is the array of buttons, you don't have to set the index explicitly you can use a loop. that's it. I hope this'll help you to refactor your code.
Marked as helpful0@Jey223Posted almost 2 years ago@mtslabrh97 Thank you so much. I'll do all these. I just found it difficult to access the colours outside the js since I am making use of tailwind.
1
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