DEV Community

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

Collapse
 
bernardm profile image
Bernard Martis

a more concise and elegant syntax to declare function expressions in Javascript. Although traditional functions and arrow functions work in a similar way

No they don’t. Functions and Lambdas (fat arrow function) are completely different things that generate similar results. Saying they are the same is akin to say + and * are the same because

2 + 2 == 4; 2 * 2 == 4
Enter fullscreen mode Exit fullscreen mode

Therefore + and * are the same

Collapse
 
ernanej profile image
Ernane Ferreira

Exactly! If you continue reading, you will see that this paragraph is just a comparison to draw the reader's attention. The purpose of this publication is to literally emphasize this difference and the necessary care that we must have when using one or the other.