// HazaaZOOZ - javascript - How to get child of child javascript
var li = document.querySelector("li");
var number = 13;
li.children[0].children[0].innerHTML = number;
let content = document.getElementById('menu');
let firstChild = content.firstChild.nodeName;
console.log(firstChild);Code language: JavaScript (javascript)
var child_element = document.querySelector("#id").children[0];
//Where # defines id and '.' a class. And 0 argument the first child element
let firstChild = parentElement.firstChild;
Code language: JavaScript (javascript)
let lastChild = parentElement.lastElementChild;Code language: JavaScript (javascript)