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

9 lines
175 B
JavaScript
Raw Normal View History

export function isPrime(value) {
2022-10-30 02:19:28 +00:00
// implementar logica aqui
for (let i = 2; i < value; i++) {
if (value % i === 0) {
return false;
}
}
return value > 1;
}