Skip to content

JavaScript outerWidth | Property

Use JavaScript outerWidth Property to find the outer width of the browser window, including all interface elements (like toolbars/scrollbars). This is read-only property and returns the width of the outside of the browser window.

window.outerWidth
//OR
outerWidth

JavaScript outerWidth example

Simple example code.

<!DOCTYPE html>
<html>
<body>
  <script>
    let width = window.outerWidth;
    //OR
    let w = outerWidth;;

    console.log('Outer Width', width)
    console.log('Width',w)
  </script>

</body>
</html>

Output:

JavaScript outerWidth Property

Do comment if you have any doubts or suggestions on this JS Property topic.

Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.

OS: Windows 10

Code: HTML 5 Version

Leave a Reply

Discover more from Tutorial

Subscribe now to keep reading and get access to the full archive.

Continue reading