mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-01 10:01:04 -04:00
chore(i18n,learn): processed translations (#49493)
This commit is contained in:
@@ -11,13 +11,13 @@ dashedName: assignment-with-a-returned-value
|
||||
|
||||
Se você se lembrar de nossa discussão sobre como <a href="/learn/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator" target="_blank" rel="noopener noreferrer nofollow">armazenar valores com o operador de atribuição</a>, tudo à direita do sinal de igual é resolvido antes de o valor ser atribuído. Isso significa que podemos pegar o valor de retorno de uma função e atribuí-lo a uma variável.
|
||||
|
||||
Assuma que temos uma função predefinida chamada `sum`, que soma dois números. Então:
|
||||
Assume we have defined a function `sum` which adds two numbers together.
|
||||
|
||||
```js
|
||||
ourSum = sum(5, 12);
|
||||
```
|
||||
|
||||
chamará a função `sum`, a qual retorna o valor `17` e então atribui este valor à variável `ourSum`.
|
||||
Calling the `sum` function with the arguments of `5` and `12` produces a return value of `17`. This return value is assigned to the `ourSum` variable.
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user