function cloneArray(array){
var result = [];
for (var i in array) {
if (array[i] === undefined) continue;
result[i] = array[i].length ? cloneArray(array[i]) : array[i];
}
return result;
}
var data = [[10,10], [0,30], [20,30], [10,10]];
var array1 = cloneArray(data);
var array2 = cloneArray(data);