How to join all the values existent on an Array in Javascript? and Xojo

Hi team!

I’ got all the Images with Name “BtnDescarga” and with Attribute “onclick”, and put it on an Array called “srcList”:

[b] Script = “var enlacesjuntos;” _

  • “var images = document.getElementsByName(‘BtnDescarga’);” _
  • “var srcList = [];” _
  • “for(var i = 0; i < images.length; i++) {” _
  • “srcList.push(images[i].getAttribute(‘onclick’));” _
  • “};”

As you can see I have a Variable “EnlacesJuntos”.

Now I want to concatenate all values of the array in this variable.


srcList Values: cat,dog,platypus,squirrel,dinosaur,beaver, crocodile

and the final value must be:

enlaces juntos: cat dog platypus squirrel dinosaur beaver crocodile

Looks like you need the Join command.

Hi wayne! . but join is for Xojo.
I dont need to join a Xojo Array. I need to join the values of a Javascript array

Have you tried searching at all?

Lol. I searched that join also exist on javascript, and do the same. Thanks