feat(desafio05):desafio-completo #5

Merged
nicolasrosadeoliveira merged 1 commits from feature/desafio05 into develop 2022-10-28 13:32:48 +00:00

View File

@ -1,4 +1,13 @@
export function isPrime(value) { export function isPrime(value) {
// implementar logica aqui // implementar logica aqui
if(value == 0 || value == 1) {
return false
}
for(let div = 2; div <= Math.sqrt(value); div++){
if(value % div == 0) {
return false
}
}
return true
} }