Good evening, I am new to javascript and I would like you to help me, please. I am creating a small practice example where I have a button that every time I click it should show me the numbers from 1 to 100, but for some reason it does not change. my foreach cycle only prints the number 100, why does this happen?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script type="text/javascript">
function Incrementar(){
let Nums = 100;
let GuardarValor;
for(var i = 0; i <= Nums; i++){
document.getElementById('Numeros').innerText = i;
}
}
</script>
</head>
<body>
<main>
<h1>COUNTER</h1>
<label id="Numeros"></label>
<br>
<button onclick="Incrementar()">Incrementar</button>
</main>
</body>
</html>