Calculator [personal project]
Issues I've faced and knowledge I've acquired
-
The yellow box that would appear in vscode was preventing my equal sign from working when using my mouse to click on it. Switching my keyboard language and then typing the required signs in my js code fixed the encoding issue.
-
Implemented sound for the first time in this website (added click sounds for whenever a button registers as pressed)
-
Implemented new tab opening when clicking on a link.
-
Error message wasn’t getting cleared out when clicking Clear on the button’s grid. Fixed it for now by going the nuclear option location.reload();
-
Handling keyboard input that would be equally associated with mouse operations.
-
My calculator screen was getting resized every time my error comes up(when dividing by 0). I fixed it by providing a min-height property to the error message’s CSS.
Live preview: https://tankengine-ish.github.io/Calculator/