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.