Merge pull request 'feat(isPrime): implementa funcao isPrime' (#5) from feature/isPrime into development
Reviewed-on: #5
This commit is contained in:
commit
085a7282e5
@ -1,4 +1,8 @@
|
|||||||
export function isPrime(value) {
|
export function isPrime(value) {
|
||||||
// implementar logica aqui
|
// implementar logica aqui
|
||||||
|
for(let i=2;i <= Math.sqrt(value);i++){
|
||||||
|
if(value % i == 0 || value < 2)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user