Learn about the JavaScript Window object, which represents the browser window and provides methods to interact with it.
- Window properties and methods
- Window size and position
- Opening and closing windows
- Window events
- Location and navigation
- Navigator object
// Get window dimensions
console.log(window.innerWidth);
console.log(window.innerHeight);
// Open new window
window.open('url', '_blank', 'width=600,height=400');
// Window events
window.onload = function() {
console.log('Page loaded!');
}- Window is the global object in browsers
- Provides access to browser features
- Can manipulate window size and position
- Important for responsive design
Difficulty: Beginner
Category: Browser APIs