closures - uninitialized vs undefined
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 55/100
- Issue 類型
- 文件
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- javascript
研究方向
先從 closure 文章中關於詞法環境和巢狀函式的部分開始,然後比較 lexenv-nested-makecounter-2.svg 和 lexenv-nested-makecounter-3.svg 中的標籤。驗證這些圖是否應將 與 undefined 區分開來,並且僅在 JavaScript 的行為支持所提議的修正時更新這些 SVG。
由索引模型根據 Issue 內容生成。
描述
in this article, we are discussing lexical environments, and the scope of variables.
upon initialization, variables are defined as <unitialized> because "the engine knows about the variable, but it cannot be referenced until it has been declared with let"
later in the article, when referencing nested lexical environments in functions, a variable is initialized as undefined. from my understanding, this is incorrect, as the engine knows about the variable, but is not referenced yet since it hasn't been declared.
i believe that we need to change the following SVG's to reflect this change:
https://github.com/javascript-tutorial/en.javascript.info/blob/master/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-2.svg
https://github.com/javascript-tutorial/en.javascript.info/blob/master/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-3.svg
if this is an incorrect assumption, please help me understand why it's undefined instead of uninitialized! i'd love to learn more about how this all works.
- 主要語言
- HTML
- 星號
- 25.5k
- 分支
- 4k
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
javascript-tutorial/en.javascript.info 的其他 Issue
-
難度 1/5 1-3 小時 新手友好度 88/100
-
難度 2/5 1-3 小時 新手友好度 84/100
-
難度 1/5 1 小時以內 新手友好度 92/100
-
Keyboard events: keydown filtering example can't block IME-composed input (Korean/Japanese/Chinese) 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
javascript-tutorial/en.javascript.info#3978 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
查看 javascript-tutorial/en.javascript.info 的全部 Issue
相似的 Issue
-
automated issue report
難度 2/5 1-3 小時 新手友好度 75/100
-
Humanity AI 未關閉
難度 1/5 1 小時以內 新手友好度 90/100
numfocus/project-fundraising#166 ·
-
area:proxy bug security severity:low track:open-source
難度 2/5 1-3 小時 新手友好度 70/100