i know append child can only be used to a node . here b is not a node . thats why 5 is not appending . but if i want to append that then how will i ?
//html
<div></div> //already created
//script
<script>
let a=5;
let b=document.getElementsByTagName("div") //div is targeted
b.appendChild(a) //b.appendchild() is not a function
</script> //
i know append child can only be used to a node . here b is not a node . thats why 5 is not appending . but if i want to append that then how will i ?