From 98281095ad6f5d9ef009041bd9f83b79c75ead85 Mon Sep 17 00:00:00 2001 From: "Henrique@Martins" Date: Fri, 28 Oct 2022 22:57:13 -0300 Subject: [PATCH] feat(05-isPrime)executa exercicio 5) --- 05-isPrime/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/05-isPrime/index.js b/05-isPrime/index.js index ec9c4ac..3ac2e58 100644 --- a/05-isPrime/index.js +++ b/05-isPrime/index.js @@ -1,4 +1,12 @@ export function isPrime(value) { // implementar logica aqui - + let primo = true + for(let i = 2; i < value; i++){ + if(value % i === 0){ + primo = false + break + } + } + + return primo } \ No newline at end of file