Notas
Arrow functions
Conteúdo das notas (1)
Página 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
Informações
- Descrição
- A-Level Javascript Notas sobre Arrow functions, criado por James Drummond em 04-09-2015.
- Criado por
- James Drummond
- Visualizações
- 7
- Tags
- Avaliação