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

9 lines
190 B
JavaScript
Raw Permalink Normal View History

export function isPrime(value) {
2022-10-30 18:23:32 +00:00
for (let divisor = 2; divisor < value; divisor++)
if (value % divisor === 0) {
return false;
}
return true;
// implementar logica aqui
2022-10-30 18:23:32 +00:00
}