They are next-generation JavaScript syntax for creating functions.
Normal JavaScript function syntax:
function myFunc() {
...
}
ES6 fat ...
For further actions, you may consider blocking this person and/or reporting abuse
Nice article.
Here's maybe the main reason to implement an arrow function => Ability to define the function at the same place it is called.
This creates a good shortcut because there are many times when you have to pass a function to a method and instead of moving to another section in your code and typing up the function definition and then coming back to that place where you will call the function, you can simply define and call the function in the same location in your code.
Makes Code More Readable / Discovering Intent
This can also make the code easier to read because a reader of the code (who is attempting to determine what the code does) doesn't have to slide down to the function definition (away from the place where it is called) -- but can instead simply read what the function does right at the same place where it is called.
Nice concise overview.
Thank you! I'll keep sharing my tidbits here.
I loved the markdown editor on this platform!
Thanks for sharing Meggie! I was thinking the same thing the markdown editor is amazing!
Using it lot of time in my code and it is really a time saviour