get screen width javascript

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

Also in JavaScript: