Learn Basic String and Array Methods by Building a Music Player New Step 11

The instructions state:
Arrow functions are always anonymous.

and a bit later on
To create a named arrow function, ...

If they can be named, then I don’t think you cannot say they are always anonymous.

Am I correct or am I missing something?

I think a better way to phrase that would be that by default arrow functions are anonymous and unamed. Then you can assign it name later on.

Here is a direct quote from MDN docs:

Arrow functions are always unnamed. If the arrow function needs to call itself, use a named function expression instead. You can also assign the arrow function to a variable so it has a name.

feel free to file an issue on it here

Thank you for your quick reply. After reading the MDN document I realise that what the instructions for Step 11 say actually make sense:

Here is the basic syntax:

() => {}

and then
To create a named arrow function, you can assign the function to a variable:

I think I’ll leave it there.
Many thanks

1 Like