How do I determine window size?
To determine window size you can use window.innerWidth and window.innerHeight properties. Whereas to determine screen size you can use screen.width and screen.height properties.