Skip to content

Commit c6fd82a

Browse files
committed
merging all conflicts
2 parents 6247879 + 97ef862 commit c6fd82a

File tree

11 files changed

+32
-10
lines changed

11 files changed

+32
-10
lines changed

1-js/02-first-steps/08-operators/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ Ora un esempio più complesso:
107107
alert(2 + 2 + '1' ); // "41" non "221"
108108
```
109109

110+
<<<<<<< HEAD
110111
Qui le operazioni vengo eseguite una di seguito all'altra, da sinistra verso destra. Il primo `+` somma i due numeri e restituisce `4`, quindi il successivo `+` concatena a quest'ultimo la stringa `1`, quindi sarebbe come fare `4 + '1' = 41`.
112+
=======
113+
Here, operators work one after another. The first `+` sums two numbers, so it returns `4`, then the next `+` adds the string `1` to it, so it's like `4 + '1' = '41'`.
114+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
111115
112116
```js run
113117
alert('1' + 2 + 2 ); // "122" non "14"

1-js/02-first-steps/14-switch/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ switch (a) {
4747
break;
4848
*/!*
4949
case 5:
50-
alert( 'Too large' );
50+
alert( 'Too big' );
5151
break;
5252
default:
5353
alert( "I don't know such values" );

1-js/03-code-quality/06-polyfills/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ Se si vuole rimanere aggiornati riguardo lo stato di supporto delle caratteristi
1111

1212
Come programmatori, amiamo utilizzare le più recenti caratteristiche del linguaggio!
1313

14+
<<<<<<< HEAD
1415
Ma come si può fare per farle funzionare sui vecchi motori JavaScript che non le comprendono ed interpretano?
16+
=======
17+
On the other hand, how to make our modern code work on older engines that don't understand recent features yet?
18+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
1519
1620
Esistono due strumenti per questo:
1721

1-js/05-data-types/04-array/article.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,15 @@ Questo operatore non offre alcun tipo di trattamento speciale per gli array, li
437437

438438
Ricordando velocemente le regole:
439439

440+
<<<<<<< HEAD
440441
- Due oggetti sono uguali con `==` solamente se fanno riferimento allo stesso oggetto.
441442
- Se uno dei due argomenti forniti all'operatore `==` è un oggetto, e l'altro è un tipo primitivo, allora l'oggetto viene convertito in primitivo, come spiegato nel capitolo <info:object-toprimitive>.
442443
- ...Con l'eccezione di `null` e `undefined` che sono uguali solamente tra di loro.
444+
=======
445+
- Two objects are equal `==` only if they're references to the same object.
446+
- If one of the arguments of `==` is an object, and the other one is a primitive, then the object gets converted to primitive, as explained in the chapter <info:object-toprimitive>.
447+
- ...With an exception of `null` and `undefined` that equal `==` each other and nothing else.
448+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
443449
444450
Il confronto stretto, con l'operatore `===` è ancora più semplice, poiché non converte i tipi.
445451

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
function topSalary(salaries) {
22

3-
let max = 0;
3+
let maxSalary = 0;
44
let maxName = null;
55

66
for(const [name, salary] of Object.entries(salaries)) {
77
if (max < salary) {
8-
max = salary;
8+
maxSalary = salary;
99
maxName = name;
1010
}
1111
}
1212

1313
return maxName;
14-
}
15-
16-
14+
}

1-js/09-classes/01-class/article.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ let user = new User("John");
5050
user.sayHi();
5151
```
5252

53+
<<<<<<< HEAD
5354
Quando viene chiamato `new User("John")`:
55+
=======
56+
When `new User("John")` is called:
57+
1. A new object is created.
58+
2. The `constructor` runs with the given argument and assigns it to `this.name`.
59+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
5460
5561
1. Viene creato un nuovo oggetto;
5662
2. Il metodo `constructor()` viene richiamato e assegna a `this.name` l'argomento dato.

1-js/09-classes/02-class-inheritance/article.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ rabbit.run(5); // White Rabbit runs with speed 5.
5353
rabbit.hide(); // White Rabbit hides!
5454
```
5555

56+
<<<<<<< HEAD
5657
Ora il codice di `Rabbit` è diventato un po' più corto, dato che utilizza il costruttore di `Animal`, e può anche correre (usare il metodo `run`) come gli animali (animals).
58+
=======
59+
Object of `Rabbit` class have access both to `Rabbit` methods, such as `rabbit.hide()`, and also to `Animal` methods, such as `rabbit.run()`.
60+
>>>>>>> 97ef86242f9f236b13152e1baf52a55c4db8728a
5761
5862
Internamente, `extends` aggiunge da `Rabbit.prototype` un riferimento `[[Prototype]]` a `Animal.prototype`:
5963

1-js/09-classes/07-mixins/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ let sayMixin = {
6969
};
7070

7171
let sayHiMixin = {
72-
__proto__: sayMixin, // (or we could use Object.create to set the prototype here)
72+
__proto__: sayMixin, // (or we could use Object.setPrototypeOf to set the prototype here)
7373

7474
sayHi() {
7575
*!*

9-regular-expressions/13-regexp-alternation/03-match-quoted-string/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ The solution: `pattern:/"(\\.|[^"\\])*"/g`.
33
Step by step:
44

55
- First we look for an opening quote `pattern:"`
6-
- Then if we have a backslash `pattern:\\` (we technically have to double it in the pattern, because it is a special character, so that's a single backslash in fact), then any character is fine after it (a dot).
6+
- Then if we have a backslash `pattern:\\` (we have to double it in the pattern because it is a special character), then any character is fine after it (a dot).
77
- Otherwise we take any character except a quote (that would mean the end of the string) and a backslash (to prevent lonely backslashes, the backslash is only used with some other symbol after it): `pattern:[^"\\]`
88
- ...And so on till the closing quote.
99

9-regular-expressions/14-regexp-lookahead-lookbehind/1-find-non-negative-integers/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
The regexp for an integer number is `pattern:\d+`.
33

4-
We can exclude negatives by prepending it with the negative lookahead: `pattern:(?<!-)\d+`.
4+
We can exclude negatives by prepending it with the negative lookbehind: `pattern:(?<!-)\d+`.
55

66
Although, if we try it now, we may notice one more "extra" result:
77

0 commit comments

Comments
 (0)