After setting a div in my HTML file to have a height of 100px and a width of 100px, I attempted to retrieve the height using JavaScript. This is what I tried:
console.log(document.GetElementById("box").style.height);
// The div had an ID of "box" and was styled with CSS, but it returned an empty line.
https://i.sstatic.net/zVqEg.png
// However, when I applied inline styling with CSS, the height was successfully logged.
https://i.sstatic.net/biXZK.png