WebDevSimplified / Vanilla-JavaScript-Calculator

Pure vanilla JavaScript calculator using modern ES6 syntax and classes
516 stars 550 forks source link

Fixed chooseOperation #43

Open zer000dawn opened 5 months ago

zer000dawn commented 5 months ago

The first conditional sentence inside the chooseOperation method didn't allow to the calculator to introduce negative numbers as a first input given that everytime the '-' button was pressed it checked for the string and being the string empty it returned nothing, with the new if statement now it can recive negative numbers as input.