In my HTML:
<div id="box">Some text</div>
In my CSS:
#box {width:222px; height:111px;}
In my JavaScript:
const section2 = document.getElementById('box');
const results = section2.getBoundingClientRect();
console.log("results " + results);
console.log returns:
results [object DOMRect]
I expected an object providing information about the size of the element and its position relative to the viewport but I simply got [object DOMRect]