Skip to content

Commit 2e59488

Browse files
committed
merging all conflicts
2 parents f9f0b4d + 8d04d0d commit 2e59488

File tree

84 files changed

+954
-66
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+954
-66
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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,19 @@ Il browser ha un suo motore JavaScript integrato, chiamato alle volte "JavaScrip
2424

2525
Esistono altri motori JavaScript, tra cui:
2626

27+
<<<<<<< HEAD
2728
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- per Chrome e Opera.
2829
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- per Firefox.
2930
- ...Ci sono altri codenames come "Chakra" per IE, "JavaScriptCore", "Nitro" e "SquirrelFish" per Safari, etc.
3031

3132
I nomi citati sopra possono essere utili da ricordare, poiché si possono trovare spesso in articoli che trattano di sviluppo web. Anche noi li useremo. Ad esempio, se "una caratteristica X è supportata da V8", probabilmente funzioneranno senza problemi in Chrome e 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+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
3240
3341
```smart header="Come funzionano questi motori?"
3442
@@ -60,7 +68,11 @@ Ad esempio, è possibile:
6068

6169
## Cosa NON può fare JavaScript a livello browser?
6270

71+
<<<<<<< HEAD
6372
Per la sicurezza dell'utente, le possibilità di JavaScript nel browser sono limitate. L'intento è di prevenire che una pagina "maligna" tenti di accedere alle informazioni personali o di danneggiare i dati degli utenti.
73+
=======
74+
JavaScript's abilities in the browser are limited for the sake of a user's safety. The aim is to prevent an evil webpage from accessing private information or harming the user's data.
75+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
6476
6577
Esempi di queste restrizioni possono essere:
6678

@@ -85,9 +97,15 @@ Queste limitazioni non si pongono se JavaScript viene eseguito fuori dal browser
8597
Ci sono almeno *tre* cose che rendono JavaScript cosi unico:
8698

8799
```compare
100+
<<<<<<< HEAD
88101
+ Completa integrazione con HTML/CSS.
89102
+ Operazioni semplici vengono eseguite semplicemente.
90103
+ Supportato dai maggiori browser ed integrato di default.
104+
=======
105+
+ Full integration with HTML/CSS.
106+
+ Simple things are done simply.
107+
+ Supported by all major browsers and enabled by default.
108+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
91109
```
92110
JavaScript è l'unica tecnologia in ambiente browser che combina queste tre caratteristiche.
93111

@@ -118,6 +136,12 @@ Ce ne sono molti altri. Ovviamente, per comprendere cosa stiamo facendo, se util
118136

119137
## Riepilogo
120138

139+
<<<<<<< HEAD
121140
- JavaScript è stato creato specificamente per i browser, ma attualmente viene utilizzato con efficacia in molti altri ambienti.
122141
- Attualmente, per quanto riguarda lo sviluppo del web, JavaScript si trova in una posizione unica grazie ad una completa integrazione con HTML/CSS.
123142
- Ci sono molti linguaggi che possono essere "convertiti" in JavaScript; essi provvedono le stesse funzionalità e risolvono gli stessi problemi. E' fortemente consigliato di leggere brevemente le funzionalità di alcuni di essi, dopo avert studiato e compreso JavaScript.
143+
=======
144+
- JavaScript was initially created as a browser-only language, but it is now used in many other environments as well.
145+
- Today, JavaScript has a unique position as the most widely-adopted browser language, fully integrated with HTML/CSS.
146+
- There are many languages that get "transpiled" to JavaScript and provide certain features. It is recommended to take a look at them, at least briefly, after mastering JavaScript.
147+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831

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 @@ In pratica, tuttavia, gli editor semplici possono avere molti plugin, tra cui la
3131

3232
Meritano attenzione le seguenti opzioni:
3333

34+
<<<<<<< HEAD
3435
- [Atom](https://atom.io/) (*cross-platform*, gratuito).
3536
- [Visual Studio Code](https://code.visualstudio.com/) (*cross-platform*, gratuito).
3637
- [Sublime Text](http://www.sublimetext.com) (*cross-platform*, con prova gratuita).
3738
- [Notepad++](https://notepad-plus-plus.org/) (Windows, gratuito).
3839
- [Vim](http://www.vim.org/) e [Emacs](https://www.gnu.org/software/emacs/) sono particolarmente carini se si sanno utilizzare.
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+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
3946
4047
## Non intestarditevi
4148

1-js/02-first-steps/01-hello-world/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ Il file dello script viene integrato nel codice HTML tramite l'attributo `src`:
7171
<script src="/path/to/script.js"></script>
7272
```
7373

74+
<<<<<<< HEAD
7475
Questo `/path/to/script.js` è il percorso assoluto al file che contiene lo script a partire dalla root del sito. Ad esempio, `src="script.js"` significherebbe un file `"script.js"` che si trova nella cartella corrente.
76+
=======
77+
Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="script.js"`, just like `src="./script.js"`, would mean a file `"script.js"` in the current folder.
78+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
7579
7680
E' anche possibile fornire un percorso relativo a partire dalla pagina corrente. Per esempio `src="script.js"` significa che il file `"script.js"` si trova nella cartella corrente.
7781

1-js/02-first-steps/04-variables/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ Adesso possiamo inserirci dei dati utilizzando l'operatore di assegnazione `=`:
2424
let message;
2525

2626
*!*
27+
<<<<<<< HEAD
2728
message = 'Hello'; // memorizzazione della stringa
29+
=======
30+
message = 'Hello'; // store the string 'Hello' in the variable named message
31+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
2832
*/!*
2933
```
3034

1-js/02-first-steps/05-types/article.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,16 @@ L'operatore `typeof` ritorna il tipo dell'argomento. E' utile quando vogliamo la
213213
214214
Sono supportate due sintassi:
215215
216+
<<<<<<< HEAD
216217
1. Come operatore: `typeof x`.
217218
2. Come funzione: `typeof(x)`.
218219
219220
In altre parole, funziona sia con le parentesi che senza. Il risultato è lo stesso.
220221
221222
Una chiamata a `typeof x` ritorna una stringa con il nome del tipo:
223+
=======
224+
A call to `typeof x` returns a string with the type name:
225+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
222226
223227
```js
224228
typeof undefined // "undefined"
@@ -248,11 +252,29 @@ typeof alert // "function" (3)
248252
249253
Le ultime tre linee potrebbero richiedere una spiegazione ulteriore:
250254
255+
<<<<<<< HEAD
251256
1. `Math` è un oggetto integrato che fornisce operazioni matematiche avanzate. Lo studieremo nel capitolo <info:number>. Qui ha il semplice scopo di rappresentare un oggetto.
252257
2. Il risultato di `typeof null` è `"object"`. Questo è un errore del linguaggio, ufficialmente riconosciuto e mantenuto per retro-compatibilità. Ovviamente, `null` non è un oggetto. E' un valore speciale che fa da tipo a se stesso. Quindi, nuovamente, questo è un errore del linguaggio.
253258
3. Il risultato di `typeof alert` è `"function"`, poiché `alert` è una funzione del linguaggio. Studieremo le funzioni nel prossimo capitolo, e vedremo che non c'e nessun tipo "funzione" nel linguaggio. Le funzioni appartengono al tipo oggetto. Ma `typeof` le tratta differentemente. Formalmente, è errato, ma molto utile nella pratica.
254259
255260
## Riepilogo
261+
=======
262+
1. `Math` is a built-in object that provides mathematical operations. We will learn it in the chapter <info:number>. Here, it serves just as an example of an object.
263+
2. The result of `typeof null` is `"object"`. That's an officially recognized error in `typeof`, coming from very early days of JavaScript and kept for compatibility. Definitely, `null` is not an object. It is a special value with a separate type of its own. The behavior of `typeof` is wrong here.
264+
3. The result of `typeof alert` is `"function"`, because `alert` is a function. We'll study functions in the next chapters where we'll also see that there's no special "function" type in JavaScript. Functions belong to the object type. But `typeof` treats them differently, returning `"function"`. That also comes from the early days of JavaScript. Technically, such behavior isn't correct, but can be convenient in practice.
265+
266+
```smart header="The `typeof(x)` syntax"
267+
You may also come across another syntax: `typeof(x)`. It's the same as `typeof x`.
268+
269+
To put it clear: `typeof` is an operator, not a function. The parentheses here aren't a part of `typeof`. It's the kind of parentheses used for mathematical grouping.
270+
271+
Usually, such parentheses contain a mathematical expression, such as `(2 + 2)`, but here they contain only one argument `(x)`. Syntactically, they allow to avoid a space between the `typeof` operator and its argument, and some people like it.
272+
273+
Some people prefer `typeof(x)`, although the `typeof x` syntax is much more common.
274+
```
275+
276+
## Summary
277+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
256278

257279
Ci sono 7 tipi base in JavaScript.
258280

@@ -267,8 +289,14 @@ Ci sono 7 tipi base in JavaScript.
267289

268290
L'operatore `typeof` ci consente di vedere quale tipo è memorizzato nella variabile.
269291

292+
<<<<<<< HEAD
270293
- Due forme: `typeof x` o `typeof(x)`.
271294
- Ritorna una stringa con il nome del tipo, come `"string"`.
272295
- Il valore `null` ritorna `"object"` -- è un errore del linguaggio, infatti non è un oggetto.
296+
=======
297+
- Usually used as `typeof x`, but `typeof(x)` is also possible.
298+
- Returns a string with the name of the type, like `"string"`.
299+
- For `null` returns `"object"` -- this is an error in the language, it's not actually an object.
300+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
273301

274302
Nel prossimo capitolo ci concentreremo nei tipi primitivi e quando avremo preso familiarità, passeremo agli oggetti.

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ Molti operatori di confronto già li conosciamo dalla matematica:
77
- Uguaglianza: `a == b` (da notare che il doppio simbolo `=` indica un test di uguaglianza, mentre il simbolo unico `a = b` rappresenta un' assegnazione).
88
- Disuguaglianza. In matematica la notazione è <code>&ne;</code>, mentre in JavaScript viene scritto come <code>a != b</code>.
99

10+
<<<<<<< HEAD
1011
In questo articolo impareremo più approfonditamente i vari tipi di confronto, come vengono gestiti in JavaScript, incluse alcune importanti peculiarità
12+
=======
13+
- Greater/less than: <code>a &gt; b</code>, <code>a &lt; b</code>.
14+
- Greater/less than or equals: <code>a &gt;= b</code>, <code>a &lt;= b</code>.
15+
- Equals: `a == b`, please note the double equality sign `==` means the equality test, while a single one `a = b` means an assignment.
16+
- Not equals: In maths the notation is <code>&ne;</code>, but in JavaScript it's written as <code>a != b</code>.
17+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
1118
1219
## Il risultato è booleano
1320

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,16 @@ Questo ci permette alcuni utilizzi interessanti rispetto al "puro e classico OR
121121

122122
Gli operandi, oltre che valori, possono essere anche espressioni arbitrarie. L'operatore OR esegue la valutazione da sinistra a destra e si ferma al primo risultato vero, il quale viene ritornato. Il processo è chiamato "valutazione a corto-circuito" perché cerca di concludersi il prima possibile, senza dover elaborare tutti gli operandi.
123123
124+
<<<<<<< HEAD
124125
Il logical OR è particolarmente utile quando il secondo argomento causerebbe un *side-effect* come l'assegnazione di una variabile o la chiamata a una funzione.
125126
Nell'esempio che segue solo il secondo messaggio verrà mostrato.
127+
=======
128+
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.
129+
130+
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.
131+
132+
In the example below, only the second message is printed:
133+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
126134

127135
```js run no-beautify
128136
*!*true*/!* || alert("not printed");

1-js/02-first-steps/13-while-for/article.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,19 @@ Esaminiamo l'istruzione `for` parte per parte:
106106

107107
| Parte | | |
108108
|-------|----------|----------------------------------------------------------------------------|
109+
<<<<<<< HEAD
109110
| begin | `i = 0` | Viene eseguito una volta sola, all'entrata nel ciclo. |
110111
| condition | `i < 3`| Viene controllata prima di ogni iterazione; se falsa, il ciclo si interrompe.|
111112
| body | `alert(i)`| Viene eseguito fino a quando la condizione è vera.
112113
| step| `i++` | Viene eseguito ad ogni iterazione, dopo il corpo, fintato che la condizione è `true`.|
114+
=======
115+
| begin | `let i = 0` | Executes once upon entering the loop. |
116+
| condition | `i < 3`| Checked before every loop iteration. If false, the loop stops. |
117+
| body | `alert(i)`| Runs again and again while the condition is truthy. |
118+
| step| `i++` | Executes after the body on each iteration. |
119+
120+
The general loop algorithm works like this:
121+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
113122
114123
L'iterazione, generalmente, funziona nel modo seguente:
115124
```
@@ -379,7 +388,11 @@ label: {
379388
}
380389
```
381390
391+
<<<<<<< HEAD
382392
...Comunque, nel 99.9% dei casi, `break` viene usato nei cicli, come abbiamo visto negli esempi precedenti.
393+
=======
394+
...Although, 99.9% of the time `break` is used inside loops, as we've seen in the examples above.
395+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
383396
384397
La chiamata a `continue` è possibile solo dall'interno di un ciclo
385398
````

1-js/02-first-steps/15-function-basics/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ In other words, per chiarire questi termini:
182182

183183
Dichiariamo le funzioni elencando i loro parametri, quindi le chiamiamo passando gli argomenti.
184184

185+
<<<<<<< HEAD
185186
Nell'esempio sopra, si potrebbe dire: "la funzione `showMessage` è dichiarata con due parametri, quindi viene chiamata con due argomenti: `from` and `"Hello"`".
187+
=======
188+
In the example above, one might say: "the function `showMessage` is declared with two parameters, then called with two arguments: `from` and `"Hello"`".
189+
>>>>>>> 8d04d0d2db97276dbb2b451c30a7bd3e05d65831
186190
187191
## Valori di default
188192

0 commit comments

Comments
 (0)