### The Goal:

As per this faq, I want to try to make a simplified explanation for arrow notation. In that lesson it is proving a challenge, but this should be applicable to anyone trying to wrap their heads around the topic.

### Function Arrow Notation

Arrow functions are a shorthand way to write out a function, and is most useful for creating a very simple and quick function. As you’ll see, especially useful for a function that takes an input, modifies it and returns a changed value. (The link at the top of this paragraph is to documentation on this topic and is a great resource to furthering your understanding).

So lets take two functions, the first is just the basic format and the second will be an example:

```
var functionVariable = function (parameter1){
return expression;
};
const timesHundred = function(number){
return number * 100;
};
```

Our example function is pretty basic, just multiplies a given number by one hundred. Useful if you want to convert decimals into percentage numbers. Now lets take a look at how each of these would be written in arrow notation.

```
var functionVariable = parameter1 => expression ;
//Note that this is equivalent to => { return expression; }
const timesHundred = number => number * 100 ;
```

As you can see it is a lot simpler. There are some caveats and rules to this: If you have only 1 parameter, no need for parenthesis but if there are 0 or muliple then it requires them. `() =>`

or `(para1, para2, ....) =>`

. On the expression end, if the function only does a return statement no brackets are necessary (as seen above), on the other hand, if it is more than `return this`

it requires brackets. Looking like this `=> { statements}`

.

These additional shortcuts can make reading these arrow functions more difficult, but just remember that if you don’t see any brackets, then the function is just returning the expression after the arrow.

Anyways this became quite wordy, for further examples check out the documentation. Please discuss below and I hope this explanation helps those struggling.