JavaScript Window outerWidth Tutorial

In this section, we will learn what the Window outerWidth property is and how to use it in JavaScript.

JavaScript Window outerWidth Property

The `outerWidth` property is used to return the width of the browser window.

Remember, this is the width of the browser window (including the tool-bar and menu-bar etc.) And not the view-port only. To get the width of the view-port, we use the `innerWidth` property.

Note: this property is read only.

Window outerWidth Property Syntax:

window.outerWidth;

Example: JavaScript outer width of window

console.log(window.outerWidth);

Output:

Depending on the width of browsers, the value of this property can change.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies