例如:[1,[8,9,9,[0,3]]]将这个数组扁平化成[1, 8, 9, 9, 0, 3]
var newArr = [];
function getArray(array){
array.forEach(function(e){
if(typeof e ==='object'){
getArray(e);
}else{
newArr.push(e);
}
});
}