forked from M3-Academy/challenge-algorithms-v2.0
feature/algoritmo #1
@ -1,4 +1,11 @@
|
||||
export function isPrime(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
for (let divisor = 2; divisor < value; divisor++)
|
||||
if (value % divisor === 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
/* for (var divisor = 2; divisor <= value; divisor++)
|
||||
if (value % divisor == 0) return true;
|
||||
else false; */
|
||||
// implementar logica aqui 2 1 / 2
|
||||
}
|
Loading…
Reference in New Issue
Block a user