9951 explained code solutions for 126 technologies


javascriptGet width and height of a window


const width = window.innerHeight;
const height = window.innerWidth;ctrl + c
innerHeight

read-only Window property, returns the interior width of the window in pixels.

innerWidth

read-only Window property, returns the interior width of the window in pixels.