forked from M3-Academy/challenge-algorithms-v2.0
feat(05-isPrime)executa exercicio 5)
This commit is contained in:
parent
3bcd58687b
commit
98281095ad
@ -1,4 +1,12 @@
|
||||
export function isPrime(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
let primo = true
|
||||
for(let i = 2; i < value; i++){
|
||||
if(value % i === 0){
|
||||
primo = false
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return primo
|
||||
}
|
Loading…
Reference in New Issue
Block a user