From 7f8f220b3388c6253f532a6ade9d235f4aba8056 Mon Sep 17 00:00:00 2001 From: Leonardo Fontes Date: Fri, 21 Dec 2018 22:25:59 -0200 Subject: [PATCH] Translation PT Finding a Remainder in JavaScript (#20955) --- .../finding-a-remainder-in-javascript/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/guide/portuguese/javascript/tutorials/finding-a-remainder-in-javascript/index.md b/guide/portuguese/javascript/tutorials/finding-a-remainder-in-javascript/index.md index aec23d9a67..860cbda7ff 100644 --- a/guide/portuguese/javascript/tutorials/finding-a-remainder-in-javascript/index.md +++ b/guide/portuguese/javascript/tutorials/finding-a-remainder-in-javascript/index.md @@ -6,18 +6,18 @@ O _operador_ `%` _restante_ fornece o restante da divisão de dois números. ## Exemplo ``` -5 % 2 = 1 because - Math.floor(5 / 2) = 2 (Quotient) +5 % 2 = 1 porque + Math.floor(5 / 2) = 2 (Quociente) 2 * 2 = 4 - 5 - 4 = 1 (Remainder) + 5 - 4 = 1 (Resto) ``` ## Uso Na matemática, um número pode ser verificado par ou ímpar verificando o restante da divisão do número por 2. ``` -17 % 2 = 1 (17 is Odd) - 48 % 2 = 0 (48 is Even) +17 % 2 = 1 (17 é Ímpar) + 48 % 2 = 0 (48 é Par) ``` -**Nota** Não confunda com o _módulo_ `%` não funciona bem com números negativos. \ No newline at end of file +**Nota** Não confunda com o _módulo_ `%` do NPM, não funciona bem com números negativos.