Skip to content

Conversation

@vorpus
Copy link

@vorpus vorpus commented Nov 7, 2017

7.11 uses the 'bad' example from 7.1. Changed to arrow function to prevent ambiguity.

7.11 uses the 'bad' example from 7.1. Changed to arrow function to prevent ambiguity.
// good
const x = function () {};
const x = () => {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an arrow function doesn't have the spacing issue this section is concerned with; the fact that function () {} is bad doesn't mean it's not useful in this example.

I'm fine adding the arrow, but we need to keep the function () {}.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ljharb Yea I was thinking about that after I made the PR - added line 811 with a function that has a longer lexical name

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ljharb You're probably right, it's too trivial of an inconsistency to not keep what is currently in the doc

@vorpus vorpus closed this Nov 8, 2017
@vorpus vorpus deleted the patch-1 branch November 8, 2017 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants