Vanilla JS Calculator

Vanilla JS Calculator
0

#1

Hi, before getting in to libraries and doing real freeCodeCamp calculator project I wanted to practice more with vanilla js. I think the code got very over complicated and messy…(and it took me a long time:)) Let me know what you think and I appreciate any help with testing it. Thanks.


#2

1 / 3 = * 3 should equal 1.


#3

You should run the test suite against your project which will check for all kinds of issues like this.


#4

Your choice of shadowing is odd to me. You need to think about where the light is coming from with respect to the buttons. With your top two inset displays, the light is coming from the upper left-hand corner, which is why the left and top are darker and the right and bottom are lit up. Your buttons are have the light source as coming from the top right, but the shadow of the buttons has the light coming from the bottom left. It can not be both ways.

Also, the left and bottom edges have the incorrect perspective.


#5

Thank You! Did some restyling, not sure if much better, but I think better than it was. Found few more errors with test suite and managed to fix them. Interesting that my real pocket casio calculator not getting 1 after 1 / 3 = * 3.