JavaScript Arrow Functions =>

In working through an exercise on FreeCodeCamp.com, I came across information that I thought would be a piece in my answer function. In that information, I saw “ =>” which piqued my interest. As often happens to me while coding, I followed this tangent to find out what this symbol means. A few minutes of Googling lead me to a beautiful explanation on stackoverflow.com that you can read here.

My understanding is this: arrow functions cut down on the typing but serve the same purpose of writing out a function with the syntax that we all should be familiar with.

function functionName (){
//some code here
}

It basically eliminates the need to write “function”.

In writing this article, I also came across the MDN page referring to arrow functions, and the more I think about it, the more I’d like to say that Douglas Crockford has something to say about not using arrow functions just to help with the readability of the code for programmers of all levels.

There are many ways to implement the arrow function, many of which escape me at this point in my programming life.