Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[webptmad0418] Paula y Alejandro#369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
alex96gm wants to merge17 commits intoironhack-labs:masterfromalex96gm:master

Conversation

alex96gm
Copy link

No description provided.

fontcubertaand others added17 commitsJanuary 10, 2017 17:49
…one" but the test is expecting for the string itself, i change the Readme file wich is the quck fix, but may be could be good to change the spec file to not confuse the student.
…tion-fixthe test are waiting for undefined but the description says false
Copy link
Contributor

@ta-web-madta-web-mad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Buen ejercicio, echadle un ojillo a lo que os he ido comentado. Buen trabajo! 👍

else {
return a;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

El resultado está bien, pero hay demasiados condicionales ahí, os valdría solo con el primer if

preview = next;
}
return preview;
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Bien pensado, aunque pierde un poco el sentido reduce si no usas dicha el acumulador como acumulador

var numSum = numbers.reduce((prev, cur) => prev + cur, 0);
return numSum;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Es correcto, peeeeeeero, no me uséis arrow functions en el callback y ponedme el return del callback, porque aún no hemos llegado a esa parte

arr = arr.map(words => words.length);
var average = arr.reduce((prev, next) => prev + next);
average = average / arr.length;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Por qué utilizáis map( ) y luego reduce( )? Mejor usad una variable que vaya acumulando los valores dentro del map en vez de usar reduce después del map. Si hacéis map y luego reduce hacéis dos bucles en vez de uno solo si utilizáis una variable sumatoria en el map


return newUnuniquifyArray;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

No entiendo tampoco vuestro uso de filter aqui, no es necesario, con un bucle y el indexOf( ) vale, no hace falta poner funciones que tienen más mecánicas de fondo que no se van a utilizar.

@@ -60,6 +138,11 @@ var wordsFind = [
'disobedience'
];

function doesWordExist(wordsArray, word) {
return wordsArray.some(item => item === word);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Correcto, pero no arrow functions y quered un poco más a los returns, que más adelante os van a dar problemas si no los ponéis

});
return count;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Es correcto. El else no es necesario y podíais haber usado filter( ) junto con length( ) para resolver este ejercicio

}
}
return greatestVerticalProduct;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Muy bien, es correcto, además no es muy largo. Podríais hacerlo solo con dos bucles?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ta-web-madta-web-madta-web-mad approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

7 participants
@alex96gm@ta-web-mad@mc100s@fontcuberta@nizaroni@papuarza@HectorBlisS

[8]ページ先頭

©2009-2025 Movatter.jp