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

Debug code does not match lesson

未關閉
#3,729 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
HTML
星號
25.5k
分支
4k
PR 合併指標
30 天內沒有已合併 PR

描述

Code Quality - 1. Debugging in the Browser, example page

The code shown in the sources panel is currently condensed to only two lines:

function hello(name){let phrase=`Hello, ${name}!`;say(phrase);}
function say(phrase){alert(`** ${phrase} **`);}

This is rather than spread over nine lines as shown in both the examples and repo .

Editing the source in browser does allow for the addition of breakpoints but upon directed refresh the code is reset to its original state and the results do not match those in the tutorial text.

Given the repo code seems to be as intended suggests perhaps a deployment issue.

Confirmed with browser versions:

  • Chrome: 126.0.6478.185 (Official Build) (64-bit)
  • Firefox: 128.0.3 (64-bit)

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

將已部署的範例頁面與 1-js/03-code-quality/01-debugging-chrome/debugging.view/hello.js 進行比較,issue 將其識別為預期的來源。首先檢查該範例如何建置或部署,然後在重新整理後驗證瀏覽器的 Sources 面板。完成的標準是:已部署的範例顯示九行原始碼,且與教學文字一致。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
documentation
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。