Does ES6 call function expression expressions?

So, after reading TJ Crowder answers this question, it seems that the ES 6 specification has rules for displaying function names for anonymous functions associated with variable names. Do we still need to use named function expressions? ES6 seems to make this unnecessary.

+5
source share
1 answer

Not yet. There is no fully compatible ES 6 JS environment yet. In addition, we will have to support legacy browsers for years to come. However, since one of the main points of using the named functional expressions is that you get the best stack trace for errors when and if the implementations catch up with the ES 6 specification, then as long as your development environment is compatible, you can do without them.

+1
source

Source: https://habr.com/ru/post/1239879/


All Articles