Notizen
Arrow functions
Inhalt der Notizen (1)
Seite 1
The syntax is like:
[1, 2, 3].map(num => num * 2)
//
Which is equivalent to:
[1, 2, 3].map(function (num) { return num * 2 })
//
So this is just shorthand for writing a callback.
Arrow functions are just for expressions:
- They do not have this or arguments
Informationen
- Beschreibung
- A-Level Javascript Notiz am Arrow functions, erstellt von James Drummond am 04/09/2015.
- Erstellt von
- James Drummond
- Aufrufe
- 7
- Tags
- Bewertung