ArrowFunctionRequiresFunctionKeyword
DRAFT

Misconception:

To define an arrow function expression, one has to use the keyword function before the list of parameters.

Incorrect

Arrow functions also require the keyword 'function'

Correct

Arrow functions do not require the keyword 'function'

Correction
Here is what's right.

Arrow function expressions can be written in different ways depending on the number of parameters and the body.

However, one never has to use the keyword function before the list of parameters.

Origin
Where could this misconception come from?

If one knows about traditional anonymous functions, their syntax prescribes the function keyword. As arrow functions are often used as a replacement for traditional anonymous functions, students might think that the same function keyword is required also for arrow functions.

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.