how to traverse the DOM with vanilla js code example Example: javascript es6 dom manipulation const myElement = document.querySelector('#foo > div.bar')