I'm learning javascript at the moment and the code below isn't producing the results I thought it would:
var links = document.getElementsByTagName("a");
for(i=0; i<links.length; i++) {
document.write(links[i]);
}
When I run this code, it writes 1 element from the array. I want it to return everything (there are over 1,000 in links)
What did I do wrong?