get screen width javascript

JavaScript
const window {
  width: window.innerWidth,
  height: window.innerHeight
}window.screen.width
//or just
screen.widthwindow.innerHeight
Source

Also in JavaScript: