feat(isPrime): adicionando a logica da funcao

This commit is contained in:
Guilherme Carvalho da Rosa 2022-10-28 16:37:19 -03:00
parent 40c3f7c838
commit 4d773d79b4

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
}
}
if(value === 1)
return false
return true
}