Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1006 Bytes

File metadata and controls

44 lines (32 loc) · 1006 Bytes

JavaScript Window Object 🪟

📺 Video

JavaScript window

📝 Description

Learn about the JavaScript Window object, which represents the browser window and provides methods to interact with it.

🎯 What You'll Learn

  • Window properties and methods
  • Window size and position
  • Opening and closing windows
  • Window events
  • Location and navigation
  • Navigator object

💻 Code Example

// 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!');
}

🎯 Key Takeaways

  • 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