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