网站正在建设中......小程序seo推广技巧
function init (arr) {var newArr = [];if (arr instanceof Array) {arr.forEach(function (value) {newArr = newArr.concat(init(value));});} else {newArr.push(arr);}return newArr;
}init([1, [2], [3, [[4]]]]);
function init (arr) {var newArr = [];if (arr instanceof Array) {arr.forEach(function (value) {newArr = newArr.concat(init(value));});} else {newArr.push(arr);}return newArr;
}init([1, [2], [3, [[4]]]]);