WebDevSimplified / Vanilla-JavaScript-Calculator

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

Line 19 is missing .toString() #22

Open kyyeo opened 2 years ago

kyyeo commented 2 years ago
`if (number === '.' && this.currentOperand.includes('.')) return`  

should be
if (number === '.' && this.currentOperand.toString().includes('.')) return

otherwise, appending a dot is not possible after a equalsButton compute()