Skip to content

Instantly share code, notes, and snippets.

@luzperdomo92
Created July 27, 2021 22:22
Show Gist options
  • Save luzperdomo92/694aac5b2f23aa590a00e518868d1a76 to your computer and use it in GitHub Desktop.
Save luzperdomo92/694aac5b2f23aa590a00e518868d1a76 to your computer and use it in GitHub Desktop.
Solución números primos
function primos (n) {
for (let i = 2; i < n; i++){
if( n % i === 0){
console.log('No es primo');
return;
}
}
console.log('es primo');
}
primos(7);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment