Seguimiento de la rama "smurf" #14

Open
gaibazzi.lucio wants to merge 8 commits from gaibazzi.lucio/clase-7-arrays-funciones-objetos:smurf into main
Showing only changes of commit 99937adad5 - Show all commits

View File

@@ -68,6 +68,24 @@ const estudiantes = [
];
// Resultado esperado: 78.75
function estudiante(e) {
return e.nota;
}
const notas = estudiantes.map(estudiante);
let suma = 0;
for (let i = 0; i < notas.length; i = (i+1)) {
suma = suma + notas[i];
}
const promedio = suma / notas.length;
console.log(promedio);
/*
5. Usar `find` para buscar un usuario por nombre dentro de un array, y mostrar
en consola un mensaje diferente según si se encontró o no.