get window height javascript

JavaScript
const window {
  width: window.innerWidth,
  height: window.innerHeight
}//get screen height of the device by using
window.innerHeight
//get screen width of the device by using
window.innerWidthwindow.screen.width
//or just
screen.width<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = 
"Screen width is " + screen.width;
</script>
Source

Also in JavaScript: