Merge pull request 'feat(isPrime): algoritmo criado.' (#5) from feature/algorithm05 into development

Reviewed-on: #5
This commit is contained in:
Luiz Felipe Silva 2022-11-01 01:24:59 +00:00
commit 8a6eb24cbd

View File

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