I have an HTML input that accepts only numbers and on my script file I have I variable that gets the value of the input. What I want to do is create another variable that is equal to the first variable. When I put a number on the input field the value of the numInput variable changes but not on the
value variable.
EDIT
what I am trying to do is, I want to use the value of the value variable on some functions that I will make.
const numInput = document.getElementById("input");
const value = numInput.value;
<header>
<input type="number" name="numInput" id="input" class="input" min="0" value="1" required>
</header>