Learn JavaScript
  • Introduction
  • Basics
    • Comments
    • Variables
    • Types
    • Equality
  • Numbers
    • Math
    • Basic Operators
    • Advanced Operators
  • Strings
    • Creation
    • Replace
    • Length
    • Concatenation
  • Conditional Logic
    • If
    • Else
    • Switch
    • Comparators
    • Concatenate
  • Arrays
    • Unshift
    • Map
    • Spread
    • Shift
    • Pop
    • Join
    • Length
    • Push
    • For Each
    • Sort
    • Indices
  • Loops
    • For
    • While
    • Do...While
  • Functions
    • Higher Order Functions
  • Objects
    • Properties
    • Mutable
    • Reference
    • Prototype
    • Delete
    • Enumeration
    • Global footprint
  • Linked List
    • Add
    • Pop
    • Prepend
    • Shift
  • Browser Object Model (BOM)
    • Window
    • Popup
    • Screen
    • Navigator
    • Cookies
    • History
    • Location
  • Date and Time
  • JSON
  • Error Handling
    • try...catch...finally
  • Events
  • Regular Expression
  • Modules
  • Debugging
  • Classes
    • Static
    • Inheritance
    • Access Modifiers
  • Promise, async/await
    • Async/Await
  • Miscellaneous
    • Hoisting
    • Currying
    • Polyfills and Transpilers
  • Exercises
    • Console
    • Multiplication
    • User Input Variables
    • Constants
    • Concatenation
    • Functions
    • Conditional Statements
    • Objects
    • FizzBuzz Problem
    • Get the Titles!
Powered by GitBook
On this page

Was this helpful?

  1. Browser Object Model (BOM)

Screen

The screen object contains the information about the screen on which the current window is being rendered. To access screen object we can use the screen property of window object.

window.screen
//or
screen

The window.screen object different properties, some of them are listed here:

Property

Description

height

Represents the pixel height of the screen.

left

Represents the pixel distance of the current screen’s left side.

pixelDepth

A read-only property that returns the bit depth of the screen.

top

Represents the pixel distance of the current screen’s top.

width

Represents the pixel width of the screen.

orientation

Returns the screen orientation as specified in the Screen Orientation API

availTop

A read-only property that returns the first pixel from the top that is not taken up by system elements.

availWidth

A read-only property that returns the pixel width of the screen excluding system elements.

colorDepth

A read-only property that returns the number of bits used to represent colors.

height

Represents the pixel height of the screen.

left

Represents the pixel distance of the current screen’s left side.

pixelDepth

A read-only that returns the bit depth of the screen.

top

Represents the pixel distance of the current screen’s top.

width

Represents the pixel width of the screen.

orientation

Returns the screen orientation as specified in the Screen Orientation API

PreviousPopupNextNavigator

Last updated 2 years ago

Was this helpful?