diff --git a/05-isPrime/index.js b/05-isPrime/index.js index ec9c4ac..d3d70d2 100644 --- a/05-isPrime/index.js +++ b/05-isPrime/index.js @@ -1,4 +1,9 @@ export function isPrime(value) { // implementar logica aqui - + for (let x = 2; x < value; x++) { + if (value % x === 0 || value <= 1) { + return false; + } + } + return true; } \ No newline at end of file