challenge-algorithms-v2.0-g.../05-isPrime/index.js

6 lines
169 B
JavaScript

export function isPrime(value) {
// implementar logica aqui
for (let div = 2; div < value; div++)
if (value % div == 0) return false;
return true;
}