So, I was reading through a js file the other day and noticed a very strange syntax for what I perceived to be a short-hand function definition. I thought it could possibly be related to a library of some kind but I coded up an example in JSFiddle using pure javascript and it does indeed work.
Has anyone seen this before? Could you point me to documentation for it so I could read a little more about it? What's the significance of the '>'
symbol after the '='
?
Sample:
() => {
alert('hi');
}
And here's the code in use on JSFiddle