forked from M3-Academy/challenge-algorithms-v2.0
10 lines
167 B
JavaScript
10 lines
167 B
JavaScript
export function isPrime(value) {
|
|
// implementar logica aqui
|
|
let x = 0;
|
|
|
|
for(let i = 0; i <= value; i++)
|
|
if(value % i === 0)
|
|
x++;
|
|
|
|
return x === 2;
|
|
} |