Skip to content

評価の流れに関する図を追加#951

Merged
chvmvd merged 2 commits intomainfrom
add-evaluation-diagram
Apr 8, 2026
Merged

評価の流れに関する図を追加#951
chvmvd merged 2 commits intomainfrom
add-evaluation-diagram

Conversation

@chvmvd
Copy link
Copy Markdown
Contributor

@chvmvd chvmvd commented Apr 5, 2026

評価の流れに関する図を追加しました。
比較の評価に関する例には、解説が書かれていなかったため、解説の図を追加するのに伴い、簡単に解説も追加しました。

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

cloudflare-workers-and-pages bot commented Apr 5, 2026

Deploying utcode-learn with  Cloudflare Pages  Cloudflare Pages

Latest commit: a0b2f83
Status: ✅  Deploy successful!
Preview URL: https://8c244d7f.utcode-learn.pages.dev
Branch Preview URL: https://add-evaluation-diagram.utcode-learn.pages.dev

View logs

@chvmvd chvmvd force-pushed the add-evaluation-diagram branch 2 times, most recently from 09adbf0 to 67d0e87 Compare April 5, 2026 12:02
@chvmvd chvmvd force-pushed the add-evaluation-diagram branch from 67d0e87 to ac7724e Compare April 5, 2026 12:07
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

他の評価の図と同じ形式にしました。

Comment on lines +86 to +88
- JavaScript で、数値と論理値に比較<Term>演算子</Term>を適用すると、`true`は`1`として、`false`は`0`として比較されます。
- `=`は代入演算子です。代入<Term>演算子</Term>の<Term>式</Term>が<Term>評価</Term>されると、右辺の<Term>値</Term>になります。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

この文言はもとのままです。

- `=`は代入演算子です。代入<Term>演算子</Term>の<Term>式</Term>が<Term>評価</Term>されると、右辺の<Term>値</Term>になります。
<Answer>

`<`の結合規則は左から右なので、`takaoHeight < everestHeight < fujiHeight`は`(takaoHeight < everestHeight) < fujiHeight`と解釈されることになります。
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

この文言と同様に書きました cf.

`+`の結合規則は左から右なので、`3 + 4 + "Hello"``(3 + 4) + "Hello"``"Hello" + 1 + 2``("Hello" + 1) + 2`と解釈されることになります。

Comment on lines +100 to +109
<Answer>

`<`の結合規則は左から右なので、`takaoHeight < everestHeight < fujiHeight`は`(takaoHeight < everestHeight) < fujiHeight`と解釈されることになります。
まず`takaoHeight < everestHeight`が<Term>評価</Term>され、`true`になります。次に`true < fujiHeight`が<Term>評価</Term>されます。`true`は`1`として比較されるため、結果は`true`になります。

![takaoHeight < everestHeight < fujiHeightの評価](./weird-comparison-evaluation.png)

`takaoHeight = everestHeight`の評価結果は、右辺の評価結果である`8849`になります。

</Answer>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

解答および解説がなかったため、解説の図を追加するのに伴い、簡単に解説を書きました。

@chvmvd chvmvd requested a review from Copilot April 5, 2026 12:11
@chvmvd
Copy link
Copy Markdown
Contributor Author

chvmvd commented Apr 5, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

評価の流れ(演算子の優先順位・結合規則)を学ぶ章に、式の評価順序を視覚化する図を追加し、比較の例に不足していた解説(Answer)を補うPRです。

Changes:

  • 3 + 4 * 5 の評価順序を示す図を追加
  • 文字列結合を含む + の結合規則の評価図を追加
  • takaoHeight < everestHeight < fujiHeight の評価過程を <Answer> と図で解説

Reviewed changes

Copilot reviewed 2 out of 6 changed files in this pull request and generated 1 comment.

File Description
docs/1-trial-session/07-boolean/index.mdx 比較の「不思議な比較」例に解説文とAnswer/図を追加
docs/1-trial-session/05-expressions/index.mdx 優先順位・結合規則の説明に評価図を追加
docs/1-trial-session/05-expressions/operator-priority-evaluation.png 演算子優先順位の評価図(PNG)を追加

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

@chvmvd chvmvd marked this pull request as ready for review April 5, 2026 12:30
@chvmvd chvmvd requested a review from Copilot April 5, 2026 12:30
@chvmvd
Copy link
Copy Markdown
Contributor Author

chvmvd commented Apr 5, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Copilot reviewed 2 out of 7 changed files in this pull request and generated no new comments.


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

Copy link
Copy Markdown
Contributor

@chelproc chelproc left a comment

Choose a reason for hiding this comment

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

とても良いと思いました!

@chvmvd chvmvd merged commit 0ed46ef into main Apr 8, 2026
7 checks passed
@chvmvd chvmvd deleted the add-evaluation-diagram branch April 8, 2026 01:49
@chvmvd chvmvd mentioned this pull request Apr 8, 2026
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.

3 participants