Sometimes, we want to get browser height with JavaScript.
In this article, we’ll look at how to get browser height with JavaScript.
How to get browser height with JavaScript?
To get browser height with JavaScript, we use the window.innerHeight
property.
For instance, we write
const browserHeight = window.innerHeight;
to get the height of the browser tab with the window.innerHeight
property.
Conclusion
To get browser height with JavaScript, we use the window.innerHeight
property.