Skip to content

Commit c0f1767

Browse files
committed
merging all conflicts
2 parents 3c99948 + 193319c commit c0f1767

File tree

14 files changed

+81
-18
lines changed

14 files changed

+81
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ sftp-config.json
2121
Thumbs.db
2222

2323

24+
/svgs

1-js/01-getting-started/1-intro/article.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,19 @@ O navegador tem um interpretador(motor) incorporado, às vezes chamado de "máqu
2424

2525
Interpretadores diferentes têm "codinomes" diferentes. Por exemplo:
2626

27+
<<<<<<< HEAD
2728
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- no Chrome e no Opera.
2829
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- no Firefox.
2930
- ...Há outros codinomes como "Chakra" para o IE, "JavaScriptCore", "Nitro" e "SquirrelFish" para Safari, etc.
3031

3132
Os termos acima são bons para lembrar, pois são usados em artigos de desenvolvedores na internet. Vamos usá-los também. Por exemplo, se "um recurso X é suportado pelo V8", então ele provavelmente funciona no Chrome e no Opera.
33+
=======
34+
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome, Opera and Edge.
35+
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox.
36+
- ...There are other codenames like "Chakra" for IE, "JavaScriptCore", "Nitro" and "SquirrelFish" for Safari, etc.
37+
38+
The terms above are good to remember because they are used in developer articles on the internet. We'll use them too. For instance, if "a feature X is supported by V8", then it probably works in Chrome, Opera and Edge.
39+
>>>>>>> 193319c963b9ba86ac7d9590f7261a36ecdcc4d2
3240
3341
```smart header="Como funcionam os interpretadores?"
3442

1-js/01-getting-started/3-code-editors/article.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,18 @@ Na prática, os editores leves podem ter muitos plug-ins, incluindo analisadores
3131

3232
As seguintes opções merecem sua atenção:
3333

34+
<<<<<<< HEAD
3435
- [Atom](https://atom.io/) (plataforma cruzada, livre).
3536
- [Visual Studio Code](https://code.visualstudio.com/) (plataforma cruzada, livre).
3637
- [Sublime Text](http://www.sublimetext.com) (plataforma cruzada, shareware).
3738
- [Notepad++](https://notepad-plus-plus.org/) (Windows, livre).
3839
- [Vim](http://www.vim.org/) e [Emacs](https://www.gnu.org/software/emacs/) também são legais se você sabe como usá-los.
40+
=======
41+
- [Atom](https://atom.io/) (cross-platform, free).
42+
- [Sublime Text](http://www.sublimetext.com) (cross-platform, shareware).
43+
- [Notepad++](https://notepad-plus-plus.org/) (Windows, free).
44+
- [Vim](http://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) are also cool if you know how to use them.
45+
>>>>>>> 193319c963b9ba86ac7d9590f7261a36ecdcc4d2
3946
4047
## Não vamos discutir
4148

1-js/02-first-steps/09-comparison/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ In JavaScript they are written like this:
77
- Greater/less than: <code>a &gt; b</code>, <code>a &lt; b</code>.
88
- Greater/less than or equals: <code>a &gt;= b</code>, <code>a &lt;= b</code>.
99
- Equals: `a == b`, please note the double equality sign `==` means the equality test, while a single one `a = b` means an assignment.
10-
- Not equals. In maths the notation is <code>&ne;</code>, but in JavaScript it's written as <code>a != b</code>.
10+
- Not equals: In maths the notation is <code>&ne;</code>, but in JavaScript it's written as <code>a != b</code>.
1111

1212
In this article we'll learn more about different types of comparisons, how JavaScript makes them, including important peculiarities.
1313

1-js/02-first-steps/11-logical-operators/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ This leads to some interesting usage compared to a "pure, classical, boolean-onl
123123

124124
It means that `||` processes its arguments until the first truthy value is reached, and then the value is returned immediately, without even touching the other argument.
125125

126-
That importance of this feature becomes obvious if an operand isn't just a value, but an expression with a side effect, such as a variable assignment or a function call.
126+
The importance of this feature becomes obvious if an operand isn't just a value, but an expression with a side effect, such as a variable assignment or a function call.
127127
128128
In the example below, only the second message is printed:
129129

1-js/03-code-quality/02-coding-style/article.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,19 @@ O seu ponto-forte reside em, à medida que verificam o estilo, poderem encontrar
302302
303303
Aqui estão algumas das mais conhecidas ferramentas de *linting*:
304304
305+
<<<<<<< HEAD
305306
- [JSLint](http://www.jslint.com/) -- um dos primeiros *linters*.
306307
- [JSHint](http://www.jshint.com/) -- mais configurações do que *JSLint*.
307308
- [ESLint](http://eslint.org/) -- provávelmente o mais recente.
308309
309310
Todos eles podem executar a tarefa. O autor utiliza [ESLint](http://eslint.org/).
311+
=======
312+
- [JSLint](https://www.jslint.com/) -- one of the first linters.
313+
- [JSHint](https://jshint.com/) -- more settings than JSLint.
314+
- [ESLint](https://eslint.org/) -- probably the newest one.
315+
316+
All of them can do the job. The author uses [ESLint](https://eslint.org/).
317+
>>>>>>> 193319c963b9ba86ac7d9590f7261a36ecdcc4d2
310318
311319
Muitos *linters* estão integrados em editores populares: apenas ative a extensão (*plugin*) no editor e configure o estilo.
312320
@@ -336,7 +344,11 @@ Aqui está um exemplo de um ficheiro `.eslintrc`:
336344
337345
Aqui a diretiva `"extends"` denota que a configuração tem como base o conjunto de configurações em "eslint:recommended". Depois disso, podemos especificar as nossas próprias.
338346
347+
<<<<<<< HEAD
339348
Também é possível descarregar conjuntos de regras de estilo da web e depois estendê-los. Veja em <http://eslint.org/docs/user-guide/getting-started> mais detalhes sobre a instalação.
349+
=======
350+
It is also possible to download style rule sets from the web and extend them instead. See <https://eslint.org/docs/user-guide/getting-started> for more details about installation.
351+
>>>>>>> 193319c963b9ba86ac7d9590f7261a36ecdcc4d2
340352
341353
De igual modo, certos *IDEs* (Ambientes de Desenvolvimento Integrado) têm *linting* incorporado (*built-in*), o que é conveniente mas não tão personalizável como o *ESLint*.
342354

1-js/04-object-basics/02-object-copy/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ clone.name = "Pete"; // changed the data in it
133133
alert( user.name ); // still John in the original object
134134
```
135135
136-
Also we can use the method [Object.assign](mdn:js/Object/assign) for that.
136+
Also we can use the method [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) for that.
137137
138138
The syntax is:
139139

1-js/05-data-types/01-primitives-methods/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ A solução parece um pouco estranha, mas aqui está:
5050
2. A linguagem permite acesso a métodos e propriedades de strings, números, booleanos e símbolos.
5151
3. Quando isso acontece, um "invólucro de objeto" especial que fornece a funcionalidade extra é criado e, em seguida, é destruído.
5252

53+
<<<<<<< HEAD
5354
Os "invólucros de objeto" são diferentes para cada tipo primitivo e são chamados: `String`, `Number`, `Boolean` e `Symbol`. Assim, eles fornecem diferentes conjuntos de métodos.
55+
=======
56+
The "object wrappers" are different for each primitive type and are called: `String`, `Number`, `Boolean`, `Symbol` and `BigInt`. Thus, they provide different sets of methods.
57+
>>>>>>> 193319c963b9ba86ac7d9590f7261a36ecdcc4d2
5458
5559
Por exemplo, existe um método para *strings* [str.toUpperCase()](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) que retorna `str` em letras maiúsculas.
5660

1-js/06-advanced-functions/01-recursion/05-output-single-linked-list-reverse/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ printReverseList(list);
3333

3434
# Using a loop
3535

36-
The loop variant is also a little bit more complicated then the direct output.
36+
The loop variant is also a little bit more complicated than the direct output.
3737

3838
There is no way to get the last value in our `list`. We also can't "go back".
3939

1-js/11-async/03-promise-chaining/article.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,29 @@ new Promise(function(resolve, reject) {
3434

3535
A ideia é que o resultado seja passado através de uma cadeia de tratadores `.then`.
3636

37+
<<<<<<< HEAD
3738
O fluxo é o seguinte:
3839
1. A promessa inicial é resolvida em 1 segundo `(*)`,
3940
2. Então o tratador de `.then` é chamado `(**)`.
4041
3. O valor retornado por ele é passado ao próximo tratador de `.then` `(***)`
4142
4. ...e assim por diante.
43+
=======
44+
Here the flow is:
45+
1. The initial promise resolves in 1 second `(*)`,
46+
2. Then the `.then` handler is called `(**)`, which in turn creates a new promise (resolved with `2` value).
47+
3. The next `then` `(***)` gets the result of the previous one, processes it (doubles) and passes the next handler.
48+
4. ...and so on.
49+
>>>>>>> 193319c963b9ba86ac7d9590f7261a36ecdcc4d2
4250
4351
Como o resultado é passado através da cadeia de tratadores, podemos observar a sequência de chamadas `alert`: `1` -> `2` -> `4`.
4452

4553
![](promise-then-chain.svg)
4654

55+
<<<<<<< HEAD
4756
A coisa toda funciona pois a chamada ao `promise.then` retorna uma promessa, assim podemos chamar o próximo `.then` nesse retorno.
57+
=======
58+
The whole thing works, because every call to a `.then` returns a new promise, so that we can call the next `.then` on it.
59+
>>>>>>> 193319c963b9ba86ac7d9590f7261a36ecdcc4d2
4860
4961
Quando um tratador retorna um valor, ele se torna o resultado da promessa, então o próximo `.then` é chamado com ele.
5062

0 commit comments

Comments
 (0)