# 第三十八關 let 與 const 觀念複習 小杰為了想學好 let 與 const,所以到網路上找了很多題目,結果竟然一題都答不出來!快來幫幫小杰來回覆題目 ## 問題 請在 Slack 回覆以下的解答,以及解釋為什麼? 同時附上你找到的文章,條列在最下方 ### 問題一 請問下面會出現的 console 是? ``` console.log(a); //ReferenceError let a = 10; ``` ### 問題二 以下是否會正常執行?若不會,會顯示什麼紅字錯誤? ``` let a = 1; a=3; ``` ``` let b = 1; let b = 2; ``` ``` const c = 3; c=4 ``` ### 問題三:此為熱門面試題目(選答) 請問 var、let、const 的區別是? ### ## 附上您的心得文章 * [JS 筆記 - 認識 ES6](https://hsuchihting.github.io/javascript/20200713/2533085867/) * [JS 筆記 - ES6 let 與 const 特性](https://hsuchihting.github.io/javascript/20200713/1088942586/) * [JavaScript 的變數比較 var、let、const](https://teishashu.github.io/blogger/2020/08/04/js-es6-%E8%AE%8A%E6%95%B8/)
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.