development #11

Merged
carloswinter merged 20 commits from development into master 2022-10-28 19:24:09 +00:00
Showing only changes of commit 0d0ca5f86d - Show all commits

View File

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