Using the Eval method in javascript for easier EVALUATION.

Solution retrospective
My solution on the calculator project. I'm open to healthy critics and self-improvement. I'd appreciate it. Thank you.
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@visualdenniss
Great job and it looks very pretty! I like your solution using the concise eval method. Everything functions well without any bugs.
I'd have two alternative suggestions for you:
-
I see you have used three different css files to switch themes. While it works perfectly, you can also use css variables to define themes in the :root, then create classnames like .light or .dark etc. etc. and assign properties there. Eventually you could attach those classes to body on click to switch themes. You can read more about CSS Variables here. This might help reduce the duplication of code/files.
-
Perhaps a max-width or min-width for the calculator, buttons would be useful in terms of preventing it over-stretching in width when browser size is too wide and opposite in smaller devices in order to preserve certain aspect ratio of width/height in design.
Hope you find this feedback helpful, keep up the great work!
-
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