JS Window Height & Width

Two properties can be used to determine the size of the browser window.

Both properties return the sizes in pixels:

These properties are read-only.

var w = window.outerWidth;
var h = window.outerHeight;
var w = window.innerWidth;
var h = window.innerHeight;
<!DOCTYPE html>
<html lang="en">
<head>
	<title>JavaScript</title>
</head>
<body onresize="resizeFunction()">
	<script>
		function resizeFunction(){
			console.clear();

			var iHeight = window.innerHeight;
			console.log('Inner Height :' + iHeight);

			var oHeight = window.outerHeight;
			console.log('Outer Height :' + oHeight);
		}	

		function resizeFunction(){
			console.clear();
			
			var iWidth = window.innerWidth;
			console.log('Inner Width :' + iWidth);

			var oWidth = window.outerWidth;
			console.log('Outer Width :' + oWidth);
		}
	</script>
</body>
</html>