feat(desafio05):desafio-completo

This commit is contained in:
Nicolas Oliveira 2022-10-28 10:31:56 -03:00
parent b88ca57528
commit af4f3269cc

View File

@ -1,4 +1,13 @@
export function isPrime(value) {
// 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
}