JavaScript Node.js Basics Building a Command Line Application Capturing Command Line Arguments

Vincent Wang
Vincent Wang
1,976 Points

Syntax help

I don't understand why we can shorten:

users.forEach( username => { getProfile(username); });



What is happening here that makes these syntaxes the same?

1 Answer

Dario Aubry
Dario Aubry
5,247 Points

Hi Vincent

You can shorten the function because of the new arrow function syntax.

I recommend you to watch this video about arrow functions:

I hope I helped you.