js find child element code example
Example 1: javascript get 2nd child element
//you can use the css nth-child property like this:
var second-child = document.querySeletorAll('[your element name]:nth-child(2)');
Example 2: get child of child javascript
var li = document.querySelector("li");
var number = 13;
li.children[0].children[0].innerHTML = number;
Example 3: how to get child element in javascript
let firstChild = parentElement.firstChild;
Code language: JavaScript (javascript)