You seem to be mixing javascript with some other language-
javascript doesn't have mult-dimensinal arrays,
though an array can be composed of arrays (or arrays of arrays)
This is a javascript array of 15 3 member arrays
var a= [[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3],
[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3],
[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]];
if you want to collapse it into an array that contains only primitives you can map each element with its String method-
a=a.map(String);
alert(a.join('\n'))
/* returned value:
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
1,2,3
*/
But a unique array in this case would have only one member.
// for IE and older clients you can sub the map method-
if(![].map){
Array.prototype.map= function(fun, scope){
var L= this.length, A= Array(this.length), i= 0, val;
if(typeof fun== 'function'){
while(i< L){
if(i in this){
A[i]= fun.call(scope, this[i], i, this);
}
++i;
}
return A;
}
}
}