feat: criação da respopsta do 05-isPrime

This commit is contained in:
Matheus Mariosa 2022-11-02 11:52:22 -03:00
parent 8947b76351
commit 4f1db060f4

View File

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