These days I was testing some Javascript features in Google Chrome 50
and I noticed that it has already been added to arrow function
for callbacks.
So:
$.each([1, 2, 3], x => x * 2);
// [2, 4, 6]
Formerly it would have to do like this:
$.each([1, 2, 3], function (x) { return x * 2; })
Can we safely use this option for all browsers (we're in 2016!), or do I still have to wait a little bit longer?