I built a JavaScript calculator! Looking for feedback on code structure/bugs


This is the JavaScript calculator I just finished for the FreeCodeCamp Frontend Development Certification. It still has bugs! For example if you enter 1/3 the numbers go off-screen… I can’t work out a reliable way to truncate the length of the result.

Another issue is that by storing the data in the HTML value attributes the model is being being mixed with the DOM.

Also I have tried to keep my model, view and controllers sort of separate but I am rendering some stuff in the controller.

I would LOVE some (any) feedback on my code style and structure and where I can improve.

Here is the CodePen: https://codepen.io/jethazelhurst/pen/NvVJMq

Thank you!