get window height javascript

JavaScript
const window {
  width: window.innerWidth,
  height: window.innerHeight
}<p id="demo"></p>

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

Also in JavaScript: