feat(isPrime): implementa function
This commit is contained in:
parent
2efed9f049
commit
e7aa3ebfa4
@ -1,4 +1,12 @@
|
||||
export function isPrime(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
|
||||
if(value === 1){
|
||||
return false;
|
||||
|
||||
} for(let divisor = 2; divisor < value; divisor++){
|
||||
if(value % divisor === 0){
|
||||
return false;
|
||||
}
|
||||
} return true;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user