I'm using this code for html:
<input pattern="/^[1-9]\d*$/g" id="num-input" type="number" min ="0" class="form-control number" placeholder="Input numbers here" aria-label="Input number here" aria-describedby="btn-generate"> and this is in my script.js file:
function numIntoUnits() { let num = $('#num-input').val() // let full_name = $("#register-full-name").val() console.log(num) } it still shows the input numbers with zero