Merge pull request 'feat(isPrime): implementa funcao isPrime' (#5) from feature/isPrime into development

Reviewed-on: #5
This commit is contained in:
DaviKlein 2022-10-28 22:09:42 +00:00
commit 085a7282e5

View File

@ -1,4 +1,8 @@
export function isPrime(value) {
// implementar logica aqui
for(let i=2;i <= Math.sqrt(value);i++){
if(value % i == 0 || value < 2)
return false;
}
return true
}