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