feat(isprime):aplicando a função no teste 5

This commit is contained in:
Gabriel Bernardini 2022-10-29 12:29:19 -03:00
parent 518d2f4275
commit 1cb7fb712c

View File

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