From 4ffe38af11bdc299a1776de07aa73649d2fa1012 Mon Sep 17 00:00:00 2001 From: MarcelloMartins Date: Sat, 29 Oct 2022 16:31:50 -0300 Subject: [PATCH] feat(05-isprime):completead fifth challenge --- 05-isPrime/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/05-isPrime/index.js b/05-isPrime/index.js index ec9c4ac..b939402 100644 --- a/05-isPrime/index.js +++ b/05-isPrime/index.js @@ -1,4 +1,9 @@ export function isPrime(value) { // implementar logica aqui - + for (let i = 2; i < value; i++){ + if (value % i === 0){ + return false; + } +} + return value >= 2; } \ No newline at end of file