javascript-tutorial / javascript-tutorial/en.javascript.info

Clarify Explanation of Function Expressions in JavaScript Tutorial

オープン
#3,776 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
HTML
スター
25.5k
フォーク
4k
PR マージ指標
30日以内にマージされた PR はありません

説明

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](https://github.com/user-attachments/assets/24692818-6d57-412b-b112-8a48042c43d2)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

JavaScript チュートリアルの Function Expressions に関するセクションから始め、Function Declarations と変数への代入を比較している引用文を見つけてください。宣言の関数名と Function Expression の変数への代入を区別できるように文言を更新し、その後、レンダリングされたチュートリアルが明確か確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
documentation
issue の種類
ドキュメント
難易度
1/5
見積もり時間
1時間未満
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。