feat(home): resolucao da questao 5 #5

Merged
ednabarboza merged 1 commits from feature/exercicio5 into development 2022-10-28 11:59:43 +00:00

View File

@ -1,4 +1,20 @@
export function isPrime(value) { export function isPrime(value) {
// implementar logica aqui // 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
}
} }