-2
I’m creating a calculator, using HTML and Javascript. My goal was that it had itself a button that allows the user to delete the last entered value (for example, the user enters the number 9 and then 8 and form 98, but he wants to erase the 8, then he pushes that button to make the value go back to being just 9), but I’m not being able to create a function for that.
I would like a code, in Javascript, to solve this problem.

Or (if the entry is a valid number)
Math.floor(inputText/10).– bfavaretto
It is... if you have with mask, formatting etc... But he said nothing.
– thxmxx
Man, I work the way I wanted, thank you very much =)
– Lucas Fernandes Afonso
Mark the answer as a solution then. The user who helped you deserves to take credit
– Pedro Augusto