You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/06-advanced-functions/12-arrow-functions/article.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Arrow functions rivisitate
2
2
3
-
Rivisitiamo l'argomento delle arrow functions.
3
+
Rivediamo l'argomento delle arrow functions.
4
4
5
5
Le arrow functions non sono semplicemente una "scorciatoia" per scrivere codice più breve. Infatti queste possiedono delle caratteristiche aggiuntive piuttosto utili.
6
6
7
-
Scrivendo codice in JavaScript ci troviamo spesso a dover scrivere delle funzioni molto semplici, che verranno però eseguite in un diverso punto del codice.
7
+
Usando JavaScript ci troviamo spesso a dover scrivere delle funzioni molto semplici, che verranno però eseguite in un diverso punto del codice.
8
8
9
9
Ad esemmpio:
10
10
@@ -61,7 +61,7 @@ let group = {
61
61
group.showList();
62
62
```
63
63
64
-
L'errore viene lanciato perché `forEach` esegue le funzioni con `this=undefined` di default, quindi il codice equivale a: `undefined.title`.
64
+
L'errore viene generato perché `forEach` esegue le funzioni con `this=undefined` di default, quindi il codice equivale a: `undefined.title`.
65
65
66
66
Questo non si verifica con le arrow functions, poiché queste non possiedono un `this`.
0 commit comments