JS Screen
Screen describes the display environment rather than the page content area. Use viewport or container measurements for layout decisions.
Where to run this
Use a local browser project for this example. It needs browser permissions, additional files, a server endpoint, or a library as described below. The restricted playground cannot provide those dependencies.
A practical example
console.log(screen.width, screen.height);
console.log(window.innerWidth, window.innerHeight);
What happens
The display size and browser viewport may differ.