Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //global Scope 글로벌 스코프
- var g =1;
- //부모가 더 이상 없는 스코프가 global 스코프이다. 전역 스코프(범위)
- //global variable(전역 변수), global object(전역 객체)
- //브라우저 환경에서 전역 객체로 window가 있다.
- function bar(){
- //bar function scope
- function foo3(){
- //foo3 function scope
- console.log(g);
- }
- foo3();
- }
- bar();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement