I had originally planned to leave the longUniqueMoreDescriptiveLexicalFoo example in, but 13.5 makes a good point that this creates a global variable, even when using const or let. So I removed those examples entirely and added a simple arrow function one. A longer description should probably go in a comment instead.
Another thing I'm not sure about is whether non-arrow function expressions should be considered good? Perhaps we want to require arrow functions wherever possible and only allow function expressions when arrow functions can't be used.
I had originally planned to leave the
longUniqueMoreDescriptiveLexicalFoo
example in, but 13.5 makes a good point that this creates a global variable, even when usingconst
orlet
. So I removed those examples entirely and added a simple arrow function one. A longer description should probably go in a comment instead.Another thing I'm not sure about is whether non-arrow function expressions should be considered good? Perhaps we want to require arrow functions wherever possible and only allow function expressions when arrow functions can't be used.