Skip to content

Instantly share code, notes, and snippets.

View luzperdomo92's full-sized avatar

Luz A. Perdomo luzperdomo92

View GitHub Profile
@luzperdomo92
luzperdomo92 / primos.js
Created July 27, 2021 23:47
rango de numeros primos.
function primos(n) {
for (let i = 2; i < n; i++){
if( n % i === 0){
return;
}
}
return true;
}
@luzperdomo92
luzperdomo92 / primo.js
Created July 27, 2021 22:22
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;
}
}