The object window.screen holds all the information you about the current screen. You can access the resolution of the screen by accessing its width and height properties.

You can always start by logging the screen size to the JavaScript console.

console.log(window.screen.width);
console.log(window.screen.height);

If you’re looking for available width and height, you should use the properties availWidth and availHeight.

console.log(window.screen.availWidth);
console.log(window.screen.availHeight);