Window 객체
브라우저에서의 자바스크립트 전역객체 window 객체
Window 객체
모든 객체가 소속된 객체이고, 전역객체이면서, 창이나 프레임을 의미함
winodw.document, window.navigator 등 모든 객체가 소속됨(전역 객체로 window를 생략해도 같은 기능을 수행 => window.alert('')= alert(''))
웹 브라우져 환경에서 전역변수를 선언한다는 것은 window 객체에 프로퍼티를 만드는 것과 같음(전역변수 a = window.a)
Last updated
Was this helpful?