I am trying to figure out what likely is simple. I have a for loop of unknown length. I'd like to do something like the following where nearby_ports_x gets x from the loop. So I might have nearby_ports_0 ... nearby_ports_x The nearby_port_x ... would the be use to post
for (x = 0; x < document.getElementsByClassName("nearby_ports").length; x++) {
nearby_ports_x = document.getElementsByClassName("nearby_ports")[x].href;
}