How do i eliminate the trailing zero in the javascript calculator

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.

Thank you! Everyday i thank the universe for the FCC team

You’re right. I followed this tutorial

It was a huge help. I will redo the look of the app after i have achieved full functionality