Solution · code-edit

querySelectorAll() 與 null guard

對照完整答案、責任邊界與原因。

本階段驗收

頁面不會替你修改檔案;請在實作檔完成後重新整理確認。

目前要處理

程式直接對 missing selector 讀 textContent。

預期看到

itemCount=3、missing=true、guarded=true、uncaught=0。

const status=document.querySelector('#status'); if (!status) return。

檔案清單

只在本階段資料夾內操作,避免改到其他章節。

證據:itemCount=3、missing=true、guarded=true

回到主題說明