feat(isPrime): funcao feita #5

Merged
NicollyVieira merged 1 commits from feature/isPrime into development 2022-10-28 17:58:09 +00:00
Showing only changes of commit d355e811b4 - Show all commits

View File

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