It provides information about the dimensions of the display screen such as its height, width, color bits, etc.
Since the window object is at the top of the scope chain, the property
Let's take a simple example to see the working of the screen object.
Find the Height and Width of Screen:
In the example below we have used the screen object to get the width and height of the screen:
||specifies the height of screen, excluding the windows taskbar
||specifies the width of the screen, excluding the Windows taskbar
||specifies the depth of color palette, in bits, to display images
||specifies the total height of the screen
||specifies the color Resolution, in bits per pixel, of the screen
||specifies the total width of the screen
Now, we will take an example to clear the concepts of Screen Object Properties:
The Screen object colorDepth property is the number of bits used to represent the color of a single pixel. It returns the bit depth of the color palette for displaying images.
There are no direct methods in the Screen method object.
Uses of Screen Object