The following properties contain the dimensions of the element, taking into account the part hidden under the scroll:
console.log(elem.scrollWidth); // a width
console.log(elem.scrollHeight); // a height
These dimensions are indicated in the figure:
Given an element and a button. When the button is clicked, display the width and height of the element with scrolling to the console.
If you subtract the full height from the height with scrolling, you get a number. What dimensions does it contain?