feat: Resolve o exercício 05-isPrime
This commit is contained in:
parent
a92b3f3aeb
commit
0771958d28
@ -1,4 +1,10 @@
|
||||
export function isPrime(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
if (value === 1) {
|
||||
return false
|
||||
}
|
||||
for (let p = 2; p < value; p++)
|
||||
if (value % p === 0) {
|
||||
return false
|
||||
} return true
|
||||
}
|
Loading…
Reference in New Issue
Block a user