get screen width javascript
snippet in javascript

get window size javascript

user4523

const window {
  width: window.innerWidth,
  height: window.innerHeight
}

get screen width javascript

user3371

window.screen.width
//or just
screen.width

get the size of the screen javascript

user7081

window.screen.height;
window.screen.width;