How do you put a restriction on a variable? (javascript) : I am trying to make an add and remove button that has an input that has a text type and it show numbers. the add and remove button work and it will show positive numbers and negative also. I don't want it to show negative numbers. How do i make it so it can't go lower than 0. Also i do not want the input to have a number type. Please help asap.
here is my code:

    <button onclick="add();">ADD</button>
    <button onclick="remove();">REMOVE</button>
    <input type="text" id="inc">

    <script>
    var i = 0;
        function add() {
            if(i >= 0) {
                i++;
                document.getElementById('inc').value = i;
            } else {
                i = 0;
                document.getElementById('inc').value = i;
            }
            
        }
            function remove() {
            i--;
            document.getElementById('inc').value = i;
        }
            </script>
