mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-30 16:01:14 -04:00
chore(i18n,learn): processed translations (#49545)
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.
|
||||
|
||||
Assume we have defined a function `sum` which adds two numbers together.
|
||||
Assuma que temos uma função definida chamada `sum`, que soma dois números.
|
||||
|
||||
```js
|
||||
ourSum = sum(5, 12);
|
||||
```
|
||||
|
||||
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.
|
||||
Chamar a função `sum` com os argumentos `5` e `12` produz um valor de retorno de `17`. Esse valor de retorno é atribuído à variável `ourSum`.
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -19,7 +19,11 @@ Aspas não são os únicos caracteres que podem ser <dfn>escapados</dfn> dentro
|
||||
|
||||
Atribua as três linhas de texto a seguir em uma única variável `myStr` usando sequências de escapamento.
|
||||
|
||||
<blockquote>FirstLine<br> \SecondLine<br>ThirdLine</blockquote>
|
||||
<pre>
|
||||
FirstLine
|
||||
\SecondLine
|
||||
ThirdLine
|
||||
</pre>
|
||||
|
||||
Você precisará usar sequências de escapamento para inserir corretamente os caracteres especiais. Você também precisará seguir os espaçamentos assim como acima, sem espaços entre sequências de escapamento ou palavras.
|
||||
|
||||
|
||||
@@ -60,43 +60,43 @@ Você deve ter pelo menos instruções `break`
|
||||
assert(code.match(/break/g).length >= 4);
|
||||
```
|
||||
|
||||
`chainToSwitch("bob")` deve ser a string `Marley`
|
||||
`chainToSwitch("bob")` should return the string `Marley`
|
||||
|
||||
```js
|
||||
assert(chainToSwitch('bob') === 'Marley');
|
||||
```
|
||||
|
||||
`chainToSwitch(42)` deve ser a string `The Answer`
|
||||
`chainToSwitch(42)` should return the string `The Answer`
|
||||
|
||||
```js
|
||||
assert(chainToSwitch(42) === 'The Answer');
|
||||
```
|
||||
|
||||
`chainToSwitch(1)` deve ser a string `There is no #1`
|
||||
`chainToSwitch(1)` should return the string `There is no #1`
|
||||
|
||||
```js
|
||||
assert(chainToSwitch(1) === 'There is no #1');
|
||||
```
|
||||
|
||||
`chainToSwitch(99)` deve ser a string `Missed me by this much!`
|
||||
`chainToSwitch(99)` should return the string `Missed me by this much!`
|
||||
|
||||
```js
|
||||
assert(chainToSwitch(99) === 'Missed me by this much!');
|
||||
```
|
||||
|
||||
`chainToSwitch(7)` deve ser a string `Ate Nine`
|
||||
`chainToSwitch(7)` should return the string `Ate Nine`
|
||||
|
||||
```js
|
||||
assert(chainToSwitch(7) === 'Ate Nine');
|
||||
```
|
||||
|
||||
`chainToSwitch("John")` deve ser `""` (string vazia)
|
||||
`chainToSwitch("John")` should return `""` (empty string)
|
||||
|
||||
```js
|
||||
assert(chainToSwitch('John') === '');
|
||||
```
|
||||
|
||||
`chainToSwitch(156)` deve ser `""` (string vazia)
|
||||
`chainToSwitch(156)` should return `""` (empty string)
|
||||
|
||||
```js
|
||||
assert(chainToSwitch(156) === '');
|
||||
|
||||
Reference in New Issue
Block a user