Skip to content

「関数」の節の戻り値の説明のコードブロックに行番号を追加#947

Open
chvmvd wants to merge 1 commit intomainfrom
add-line-number-to-return-value-codeblock
Open

「関数」の節の戻り値の説明のコードブロックに行番号を追加#947
chvmvd wants to merge 1 commit intomainfrom
add-line-number-to-return-value-codeblock

Conversation

@chvmvd
Copy link
Copy Markdown
Contributor

@chvmvd chvmvd commented Mar 28, 2026

次のように行番号を指定して説明が行われているにも関わらず行番号が明示されていなかったため、認知付加を下げるため、行番号を追加しました。

上の例の6行目で、<Term>式</Term>`add(3, 4)`が<Term>評価</Term>されると、`a = 3, b = 4`として`add`<Term>関数</Term>が実行されます。`add`<Term>関数</Term>の中で<Term>文</Term>`const sum = a + b;`が実行されると、<Term>式</Term>`a + b`が<Term>評価</Term>され、`7`になります。これにより、`sum``7`が代入されます。次の行`return sum;``add`<Term>関数</Term>は<Term>変数</Term>`sum`を<Term>評価</Term>した結果である、`7`を<Term>返し</Term>ます。そして<Term>式</Term>`add(3, 4)`の<Term>評価</Term>結果が`7`となります。

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying utcode-learn with  Cloudflare Pages  Cloudflare Pages

Latest commit: 03e040a
Status: ✅  Deploy successful!
Preview URL: https://a4a9824e.utcode-learn.pages.dev
Branch Preview URL: https://add-line-number-to-return-va.utcode-learn.pages.dev

View logs

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

「関数」章の戻り値説明で、本文が参照しているコードの行番号が表示されていなかったため、コードブロックに行番号表示を追加して認知負荷を下げるPRです。

Changes:

  • 戻り値の説明に対応する JavaScript コードブロックへ showLineNumbers を付与し、行番号を表示するように変更

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chvmvd chvmvd marked this pull request as ready for review March 28, 2026 11:48
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

Successfully merging this pull request may close these issues.

2 participants