Named Arrow Functions
Ron Waldon
jokeyrhyme at gmail.com
Wed Aug 12 06:27:36 UTC 2015
For use cases that require named Functions (e.g. recursion), surely it's
not a such a big deal to either assign an Array Function to a variable
first, or use the good old trusty named Function expression or Function
statement.
var recurseExample = () => { recurseExample(); }
var recurseExample = function recurseExample () { recurseExample(); }
function recurseExample () { recurseExample(); }
I wonder if it's even a good idea to use Arrow Functions in places that do
not benefit from the new `this` behaviour? Just because code takes up fewer
characters does not necessarily mean it is easier to understand.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150812/dabc7058/attachment.html>
More information about the es-discuss
mailing list