var newDiv = document.createElement('div');
newDiv.innerHTML = '<p>Hello World!</p>';
document.body.appendChild(newDiv);
const myElement = document.querySelector('#foo > div.bar')
myElement.matches('div.bar') === true
const myElements = document.querySelectorAll('.bar')
const myChildElemet = myElement.querySelector('input[type="submit"]')
// Instead of
// document.querySelector('#foo > div.bar input[type="submit"]')