haschildnodes js code example
Example: hasChildNodes
let foo = document.getElementById('foo');
if (foo.hasChildNodes()) {
// Do something with 'foo.childNodes'
}
let foo = document.getElementById('foo');
if (foo.hasChildNodes()) {
// Do something with 'foo.childNodes'
}