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