What is the difference between window.innerHeight and document.body.offsetHeight?

What is the difference between window.innerHeight and document.body.offsetHeight?
July 2nd 19 at 14:12
1 answer
July 2nd 19 at 14:14
Solution
window.innerHeight:
On return, intViewportHeight is the height of the browser window's viewport.
The window.innerHeight property is read only; it has no default value.

HTMLElement.offsetHeight is the height of the element subject to vertical padding and borders, in pixels. The property read-only, read-only. The return value is an integer.

Therefore I can assume that one is focused on the window, and the second on the block(in this case body)

Find more questions by tags JavaScriptHTMLjQuery