tinauser
14 years agoFrequent Contributor
array as temporary variable
Hi,
can I save a jscript array as temporary variable?say I name a project variable of type object pr_arr.
Then in a script i do:
var arr = new Array();
arr["k1"] = "i1";
//..arr["k_n"] = "i_n";
is it correct the following assignment?
Project.Variables.pr_arr = arr;
I have problems then to use the variable as an array: indeed I can do:
for (el in arr)
{}
but I can not do
for(el inProject.Variables.pr_arr )
{}
where is my error?
Thx
can I save a jscript array as temporary variable?say I name a project variable of type object pr_arr.
Then in a script i do:
var arr = new Array();
arr["k1"] = "i1";
//..arr["k_n"] = "i_n";
is it correct the following assignment?
Project.Variables.pr_arr = arr;
I have problems then to use the variable as an array: indeed I can do:
for (el in arr)
{}
but I can not do
for(el inProject.Variables.pr_arr )
{}
where is my error?
Thx