suppose I have printed a list of values and stored in a variable.The variable is of string type.Now I need to push those elements stored in a variable into an array.How can do this using javascript?
private var data : String;
private var dataarray:Array;
for(var k : int = 0; k < StockItemsProperties_list.Count; k++)
{
data=StockItemsProperties_list[k].InnerText+"\t";
dataarray=new Array();
dataarray.Push(data);
Debug.Log("Elements in the array"+dataarray);
}
1 a 2 c But i need the output as 1 a