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