Review my Javascript Calculator

Review my Javascript Calculator
0

#1

HI,
Can you review it please.

Technologies I used are Pug, vanilla Javascript, Stylus


#2

Hi, looks super nice. I like the phone idea.

A few things though: unlimited dots, unlimited operators, overflowing text, (0.10.2 = 0), (.1.2 = NaN). And for design, you might want to use × (×) and ÷ (÷).


#3

A couple of other points;

  • Divided by zero says “Infinity.” A cannot-divide-by-zero message might be better.

  • The display doesn’t clear after clicking =.

  • Maybe consider something other than the “I-beam” pointer.

  • The cell-phone image is good and a nice idea.

  • Bruce


#4

The only other issue I noticed is you allow leading zeros (this doesn’t break the calc though :+1:

If I type minus 9, minus 6 I get

" err with sign - "