Solución
solution.tsTypeScript
function allTrue(values: boolean[]): boolean {
if(values.length == 0) return true; // si está vacío, true
for (const value of values) {
if(!value) return false; // Si uno es falso, false
}
return true; // Si no había falsos, true
}
// No modificar: necesario para evaluar el resultado.
export { allTrue };0respuestas