feature/algoritmos #1

Merged
FilipeQuintanilha merged 10 commits from feature/algoritmos into master 2022-10-28 16:03:10 +00:00
Showing only changes of commit c842588b37 - Show all commits

View File

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