GoConqr has a new look! Let us know what you think.

Notes

Arrow functions

James Drummond Javascript A-Level English 1 page

Content of the notes (1)

Page 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

Information

Description
A-Level Javascript Note on Arrow functions, created by James Drummond on 04/09/2015.
Created by
James Drummond
Views
7
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?