I trying to introduce a loop For, to read 5 olympic athletes and return your category according to your age, but i don't know how to read the array in the loop, i'm still learning how to work with it
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Categoria Olimpíadas</title>
<input id="numberInput" name="numberInput" value="" type="array" />
<button onclick="send()">Confirm</button>
<script type="text/javascript">
function send() {
const age = document.getElementById("numberInput").value;
const numbers = [age];
console.log(numbers);
for (i = 0; i <= 5; i++) {
if (numbers <= 12) {
alert("Not qualified to compete");
} else if (13 >= numbers || numbers <= 15) {
alert("Minor category");
} else if (16 >= numbers || numbers <= 19) {
alert("Juvenile category");
} else if (20 >= numbers || numbers <= 23) {
alert("Under 23 category");
} else if (24 >= numbers || numbers <= 35) {
alert("Adult category");
} else {
alert("Master category");
}
}
}
</script>
</head>
</html>