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