[Javascript] var vs let 차이

Web 2018. 4. 23. 20:54

var는 function-scoped

let은 block-scoped


let이 좀더 C언어의 변수선언과 비슷한 느낌이다


https://gist.github.com/LeoHeo/7c2a2a6dbcf80becaaa1e61e90091e5d



WRITTEN BY
hojongs
블로그 옮겼습니다 https://hojongs.github.io/