javascript copying array to another
<p>i have the following code snippet, where inside for loop the value to contain is not getting assigned, is this is the proper way to copy array to other.??</p>

<p>as here </p>

<pre><code>  var groupCondition = "ALL-OF-THEM&amp;ALL-OF-THEM&amp;ALL-OF-THEM&amp;ALL-OF-THEM&amp;";
  var groupParam =    "rsTxTraceMsgAside&amp;rsExpTraceMsgAside&amp;rsTxTraceMsgBside&amp;rsExpTraceMsgBside&amp;#hp1TxTraceMsg&amp;hp1ExpTraceMsg&amp;#";



  var grpNameArr = groupParam.split("#");
  var groupcn= groupCondition.split("&amp;");
  var m=grpNameArr.length;

var contain=new Array();
var cmds=new Array();
var ii;

for(ii=0;ii&lt;(m-1);ii++)
{
   contain[ii] = groupCn[ii];
   cmds[ii] = grpNameArr[ii];
 }
</code></pre>
