Exercices - WOA - Intro JS
Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Somme de nombres premiers
La somme des nombres premiers entre 1 et 10 vaut 2 + 3 + 5 + 7 = 17.
Écrire la fonction permettant de trouver la somme des nombres premiers entre 1 et n (fournie en paramètre).
Écrire l'algorithme.
1
2
3
4
5
6
7
8
9
10
11
function sommeNombresPremiers(n)
{
return n;
}
// {
module.exports = {
sommeNombresPremiers: sommeNombresPremiers
};
// }
Press desired key combination and then press ENTER.
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content