I m trying to get a css property on page load but as you can see below, it never shows the display but it shows correctly if I change it. My question is how can I display the "block" on Display 1?
Thanks for your help
let hello = document.getElementById('hello');
document.getElementById('you').innerHTML += hello.style.display;
hello.style.display = "inline-block";
document.getElementById('too').innerHTML += hello.style.display
#hello {
background-color:yellow;
height:20px;
display:block;
}
<div id="hello">Hello</div>
<div id="you">Display 1: </div>
<div id="too">Display 2: </div>