for ( x = 0; x < origLen; x++ ) { if ( newArr.indexOf(origArr[x]) == -1 ) newArr.push(origArr[x]); }