0

Is there a predefined method to append a text in every element of a javascript array?

I created this app that handles an array with more than 500 elements in it. For each element, I want to append some text. Currently I used this method. for(var i=0; i<myArray.length; i++){ myArray[i]=myArray[i]+"some text here"; } The method works fine, but it takes time to load the entire program. Is there a shorter solution for this. Thank you.

22nd Apr 2017, 1:09 AM
Jumar Hamac
Jumar Hamac - avatar
1 Resposta
0
i dont think theres another way. it is all about processing speed after that
22nd Apr 2017, 1:33 AM
Giannis Tsirovasilis
Giannis Tsirovasilis - avatar