How do i get rid of the zero that appears in my input. Above is my fifth attempt at it which also hasn’t worked
this is the link to my code:
How do i get rid of the zero that appears in my input. Above is my fifth attempt at it which also hasn’t worked
this is the link to my code:
Shift returns the “0” that i was trying to get rid of. Thank you for this. I still have no solution but at least i got rid of one mistake.
I tried to use the filter function but my calculator displays “NaN8” when i clear then click on 8
if (calc.input === 0) {
You are already checking if the calcl.input is 0, so why don’t you just specify what you want to pass to setCalc in that situation. Then in an else statement, do something different?
FYI - Your calculator styling (fonts, colors, layout) looks almost identical to another project, so make sure yours is unique.