html code
<div id="inner-div" class="inner-div">
<p>background color </p>
</div>
var bColorTextById = document.getElementById("inner-div").children; var bColorTextByClass = document.getElementsByClassName("inner-div").children;
console.log(bColorTextByClass ) console.log(bColorTextById )
why answer is undefined in case of class but returns children in case of id