Concat

hopefully simple javascript question

orbi72's picture

Can't seem to get something simple to work with Javascript: I have a structure of numbers which i want to make twice as long and fill it with the same order of initial structure members.

So if arrayIN consists of [0,1,2,3] , I want the arrayOUT to look like this [0,1,2,3,0,1,2,3]. kind a like doubling the length with identical array. I think you can .concat a structure in javascript but it doesn't work with my extremely limited javascript skills

don't laugh, I'am doing something foolish here obviously:) Like not iterating the values in the array or something, but how? Can anyone help me Thank you

javascript:

function (__structure arrOut) main (__structure arrIn) { var result = new Object(); var arrNew = new Array();

if(!_testMode) { arrNew.concat(arrIn,arrIn); }

result.arrOut = arrNew; return result; }