Merge pull request 'feat(home): resolucao da questao 5' (#5) from feature/exercicio5 into development
Reviewed-on: #5
This commit is contained in:
commit
836f317355
@ -1,4 +1,20 @@
|
||||
export function isPrime(value) {
|
||||
// implementar logica aqui
|
||||
let prime = true
|
||||
|
||||
if(value > 1){
|
||||
for(let i=2; i < value; i++){
|
||||
if(value % i === 0){
|
||||
prime = false
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(prime === true){
|
||||
return true
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user