1
I have the following question. I will simplify as much as I can for you to understand. I am developing a game and have an array of values. This array is multidimensional:
var valores = [["jaguatirica", "onça-pintada", "suçuarana"],["sabia","canario"],["pacu", "lambari"]]
And I have another multidimensional array with image paths:
var img = [["jaguatirica.jpg", "onça-pintada.jpg", "suçuarana.jpg"],["sabia.jpg","canario.jpg"],["pacu.jpg", "lambari.jpg"]]
I want to turn these two arrays into one:
var resultado = [valores[0][0], img[0][0]]
which will result: ocelot, ocelot.png.
But I want all the values to come together with their respective images. Please help me, it is an educational game and will be used in municipal schools. link of the game under development
Is using pure javascript (according to the tag used) or has a jQuery running as well?
– William Aparecido Brandino
Only javascript is pure anyway
– Luis Carlos de Souza Muniz
Right. Put the right answer here on @Theprohands, because he answered what you would say: make a
for
traverse an array and join with each other.– William Aparecido Brandino