Cuéntanos qué está pasando:
Hi!
Please help! Idk what Im doing wrong here.
“Inside your if statement, check if the guess is in the numbers array using the .includes() method.”
Tu código hasta el momento
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function pick(guess) {
const numbers = [];
while (numbers.length < 10) {
numbers.push(Math.floor(Math.random() * 11));
}
text.innerText = "You picked " + guess + ". Here are the random numbers:\n";
for (let i = 0; i < 10; i++) {
text.innerText += numbers[i] + "\n";
}
if (numbersarray.includes(guess)) {
}
}
// User Editable Region
Información de tu navegador:
El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Información del Desafío:
Aprende JavaScript Básico Construyendo un Juego de Rol - Step 169