I just call them "regular functions", "function declarations", or similar. I'll add "arrow" if there's an arrow, and "async" if there's an `async` keyword. -----
Isiah Meadows [email protected] Looking for web consulting? Or a new website? Send me an email and we can get started. www.isiahmeadows.com On Sat, Apr 7, 2018 at 5:14 PM, C. Scott Ananian <[email protected]> wrote: > "keyword function" might not be too bad, either... > --scott > > On Sat, Apr 7, 2018 at 2:32 PM, Naveen Chawla <[email protected]> wrote: >> >> "function" function is the best out of all of the alternatives you >> mentioned. >> >> "Anonymous function declared with the function keyword" if it's not too >> wordy. >> >> On Sat, 7 Apr 2018 at 23:50 Eli Perelman <[email protected]> wrote: >>> >>> I've always referenced them as: >>> >>> Function declarations: >>> >>> function a() {} >>> >>> Function expression: >>> >>> const a = function() {} >>> >>> Named function expression: >>> >>> const b = function a() {} >>> >>> Arrow function: >>> >>> const a = () => {} >>> >>> Not sure it's 100% semantic or descriptive, but it's how I've >>> differentiated. >>> >>> Eli Perelman >>> >>> >>> On Sat, Apr 7, 2018, 12:56 PM T.J. Crowder >>> <[email protected]> wrote: >>>> >>>> Bit of a silly one, but begging the list's indulgence: >>>> >>>> I routinely explain various JavaScript topics to learners, including >>>> arrow functions, method syntax, etc. When I want to contrast "arrow >>>> function" (for instance) with functions defined with `function`, it trips >>>> me >>>> up, and often I end up saying/writing something awful like "`function` >>>> function". I've considered using "normal function" instead, but arrow >>>> functions are normal in today's world, as are functions defined with method >>>> syntax (although I'd usually call them methods), so it's...unsatisfying. >>>> >>>> But `function` function is just so clumsy. And a pedant (none of those >>>> here, surely!) could argue the definition (are generators `function` >>>> functions? they're defined with `function` [when you're not using generator >>>> method syntax], it just has a `*` after it). >>>> >>>> I've also considered "old-style function," but `function` functions >>>> still have a place in today's JavaScript, just not as prominent a place as >>>> they used to. >>>> >>>> A recent post to the list used "conventional function," but it may well >>>> have the same problems "normal function" does. >>>> >>>> My goal is to be clear, and *reasonably* accurate, without being overly >>>> pedantic. >>>> >>>> Any ideas? Should I just stop worrying and learn to love "normal >>>> function"? Is there a better term? >>>> >>>> Thanks in advance, folks. >>>> >>>> -- T.J. Crowder >>>> _______________________________________________ >>>> es-discuss mailing list >>>> [email protected] >>>> https://mail.mozilla.org/listinfo/es-discuss >>> >>> _______________________________________________ >>> es-discuss mailing list >>> [email protected] >>> https://mail.mozilla.org/listinfo/es-discuss >> >> >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> > > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

