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