retornando se o numero e primo

This commit is contained in:
Carlos cristovao guerreiro scantbelruy 2022-10-28 08:09:55 -04:00
parent 6d011b3494
commit 0f4862a8d5

View File

@ -1,4 +1,5 @@
export function isPrime(value) { export function isPrime(value) {
// implementar logica aqui for (var i = 2; i < value; i++)
if (value % i === 0) return false;
return value !== 1;
} }