I agree that arrow functions makes the code simple and cleaner on most of the cases. But, I would just like to say that your example on the ES5 or the non arrow function can also be simple and cleaner and I think a little shorter as well.

Removing the explicit return of boolean values will do it. Like the first example about the email validation.

You can also write the same thing in there using the or operator instead of showing an example with the if-else condition branching.

function() { return validateEmail(value) || ‘invalid email’; }

Written by

Improvise, Adapt, Overcome

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store