Trial 1: Within the same HTML file
Head:
<script>
function backSpace() {
var bsp = document.getElementById("ns").value;
document.getElementById("ns").value=bsp.substring(0,bsp.length -1);
}
</script>
Body:
<span class="num" onclick="backSpace()"><i class="fas fa-backspace">Backspace</i></span>
Trial 2
Is there a way to use "--" of the existing value and just backspace without using functions?