Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

About Arrary

$
0
0

Hi expert,

 

if I alert(i), the result is myArrayloop1 , myArrayloop1 , myArrayloop1 , but I want the result is A, B, C

 

below is my Script:

 

var myArray1 = ["A", "B", "C"];

var myArray2 = ["1", "2", "3"];

 

var myArray1Split = myArray1.toString().split(",");

var myArray2Split = myArray2.toString().split(",");

 

for (j = 0; j < myArray1Split.length; j++) {

var myArrayloop1 = myArray1Split[j];

var myArrayloop2 = myArray2Split[j];

 

 

var myText = {myArrayloop1 : myArrayloop2};

for (var i in myText){

alert(i);

alert(myText[i]);

}

}


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>