js dom function that selects all elements code example Example: select all elements javascript var elements = document.getElementsByTagName("*");