Feat:Finalizado isPrime

This commit is contained in:
Gustavo Rallenson Gonçalves Da Silva 2022-10-28 20:19:33 -03:00
parent 8c84f29873
commit fce8544071

View File

@ -1,4 +1,13 @@
export function isPrime(value) {
// implementar logica aqui
if(value === 1){
return false
}else{
for(let divisor = 2; divisor < value; divisor++){
if((value%divisor === 0)){
return false
}
}
}
return true
}