Global1 Java Script - scope scope - 식별자 접근 규칙에 따른 유효 범위이다. 안쪽에서 바깥쪽으로는 접근 가능하지만 반대는 불가능하다. 중첩이 가능하다. Global Scope와 Local Scope가 있다. function jean(){ let brand_name = "PLAC"; console.log(brand_name); } jean(); console.log(brand_name); brand_name은 local scope로 console.log(brand_name)에서는 사용할 수 없다. 바깥쪽에서 안쪽으로는 접근이 불가능하기 때문이다. let brand_name2 = "GU"; function jean2(){ console.log(brand_name2); } jean2(); brand_name2는 global sco.. 2022. 12. 11. 이전 1 다음