challenge-algorithms-v2.0/05-isPrime/index.js

9 lines
185 B
JavaScript
Raw Permalink Normal View History

export function isPrime(value) {
// implementar logica aqui
for (let x = 2; x < value; x++) {
if (value % x === 0 || value <= 1) {
return false;
}
}
return true;
}