forked from M3-Academy/challenge-algorithms-v2.0
Merge branch 'feature/isPrime'
This commit is contained in:
commit
996757b693
@ -1,4 +1,10 @@
|
||||
export function isPrime(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
}
|
||||
let divisor = 2;
|
||||
while (value % divisor != 0) divisor++;
|
||||
|
||||
if (value == divisor) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user