I need to solve this exercise for the faculty and I'm not being able to. Someone could help me?
The letter says: "Enter two numbers and when pressing a button show all the numbers between those two numbers (inclusive). Consider the case that the numbers are entered inverted (first the largest and then the smallest)"
- This was what I did:
function Ejercicio8() {
let resultado = 0;
let numero1 = Number(document.querySelector("#txtNumero8").value);
let numero2 = Number(document.querySelector("txtNumero8A").value);
while (i <= numero2) {
if (numero1 > numero2) {
document.querySelector("#pResultado8").innerHTML += resultado + " ";
}
i--
}
}
Thank you!