DEV Community

Discussion on: An Overview of JavaScript Functions

Collapse
 
lexlohr profile image
Alex Lohr

The syntax _=>... will take an argument _ and is not special in any way, since the underscore is considered a normal variable name character. You could also write a=>... to the same effect.

To prove there is no difference, try the following:

(_=>{}).length // 1
(a=>{}).length // 1
(()=>{}).length // 0
Collapse
 
howtocodejs profile image
HowToCodejs

Thanks for the heads up!