Skip to content
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

Clarify Explanation of Function Expressions in JavaScript Tutorial #3776

Open
Skllkzm opened this issue Oct 29, 2024 · 0 comments
Open

Clarify Explanation of Function Expressions in JavaScript Tutorial #3776

Skllkzm opened this issue Oct 29, 2024 · 0 comments

Comments

@Skllkzm
Copy link

Skllkzm commented Oct 29, 2024

Description: The section of the tutorial discussing function expressions could benefit from a clearer distinction between Function Declarations and Function Expressions. Currently, the wording may cause confusion by implying that a Function Declaration creates a "variable" to hold the function name, which isn’t technically accurate.

Suggested Changes: In the tutorial, this line:

"The Function Declaration (1) creates the function and puts it into the variable named sayHi."

Might be more accurately phrased as:

"The Function Declaration (1) creates a function with the name sayHi. Unlike a Function Expression, this doesn’t involve a variable assignment."

This change would help learners understand that sayHi in this example is the function’s name from the declaration, rather than a variable containing the function reference.

Additional Context: I initially misunderstood this as creating a variable. I believe this clarification would prevent similar confusion for others. Thanks for considering this suggestion!

See screenshot attached
1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant