forked from M3-Academy/challenge-algorithms-v2.0
feat(challenge-5): completed challenge
This commit is contained in:
parent
e99efef366
commit
1b584da7b2
@ -1,4 +1,12 @@
|
||||
export function isPrime(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
}
|
||||
if (!value) return 0;
|
||||
|
||||
for(let i = 2; i < value; i++){
|
||||
if(value % i === 0){
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user