Just finished JS Calculator. Feedback please!

Just finished JS Calculator. Feedback please!
0

#1

Hi campers,
here is the link. Needs your feedbacks :slight_smile:


#2

Checked a few things:

  • Unlimited dots
  • Unlimited minuses
  • Unlimited zeros
  • Pressing more than 1 operator returns NaN
  • 0.1 * 0.2 = 0.200…4
  • Entering to much input will clear the the input
  • Entering a number and pressing = returns NaN

#3

I will review codes for the first three. I placed control if number exceeds 13 calc. displays nothing and while you continue pressing numbers if amounts>20 it will display you “Err” message.

0.1*0.2=0,020000000 on my browser. The result is true but repeating zeros is a problem.

thank you for your feedback.


#4

It should end with a 4, it is because of the floating point error.


#5

yes, it seems what is floating problem. I fixed it using toFixed() method.