DEV Community

Discussion on: The difference between traditional functions and arrow functions in javascript

Collapse
 
bushblade profile image
Will Adams • Edited

You missed out one important feature of an arrow function - implicit one line return i.e. if your code evaluates on one line and you don't use { } a code block, then you can return from the function without using the return statement.
Additionally your statement implies that function declarations have their own this which is not true.

Also arrow functions do have a this it's just bound to lexical scope i.e. whatever this points to in the scope of where you wrote the function.