forked from M3-Academy/challenge-algorithms-v2.0
retornando se o numero e primo
This commit is contained in:
parent
6d011b3494
commit
0f4862a8d5
@ -1,4 +1,5 @@
|
||||
export function isPrime(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
for (var i = 2; i < value; i++)
|
||||
if (value % i === 0) return false;
|
||||
return value !== 1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user