feat(isPrime): Implementacao da funcao isPrime

This commit is contained in:
Wellington Duarte Santos 2022-11-01 09:13:51 -03:00
parent fe7512aaff
commit 335d584521

View File

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