feat: resolucao funcao isPrime

This commit is contained in:
Guilherme de Camargo Barbosa 2022-10-29 17:01:58 -03:00
parent 81678ac150
commit 938bfcee0f

View File

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