Skip to content

"Named function expression" is wrong #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gitdallas opened this issue Aug 27, 2013 · 2 comments
Closed

"Named function expression" is wrong #415

gitdallas opened this issue Aug 27, 2013 · 2 comments

Comments

@gitdallas
Copy link

From the guide:

// Named function expression.

var foo = function() {
    // Do something.
};

This is actually a variable assigned to an anonymous function.

@scottgonzalez
Copy link
Member

Indeed. The expression should be of the form:

var foo = function foo() { ... };

To be honest, I don't think named function expressions are a JS101 topic.

@arthurvr
Copy link
Member

arthurvr commented Dec 5, 2014

To be honest, I don't think named function expressions are a JS101 topic.

I agree on that. I'il open a PR.

Update: Opened #578

@gnarf gnarf closed this as completed in 483e237 Dec 23, 2014
arthurvr added a commit to arthurvr/learn.jquery.com that referenced this issue Jan 4, 2015
Krinkle pushed a commit that referenced this issue Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants