how to get child of element in javascript code example
Example 1: get child of child javascript
var li = document.querySelector("li");
var number = 13;
li.children[0].children[0].innerHTML = number;
Example 2: how to get child element in javascript
let content = document.getElementById('menu');
let firstChild = content.firstChild.nodeName;
console.log(firstChild);Code language: JavaScript (javascript)