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