标签:his i++ this class asc span java var bsp
var thisArr = function(arr) { var new_arr = []; for(var i = 0; i < arr.length; i++){ if(Array.isArray(arr[i])){ thisArr(arr[i]); }else{ new_arr.push(arr[i]); } } }; function ladding(){ var arr = [1,2,3,4,5,["a","b","c","d","e",["A","B","C","D","E",["FIRST","SECOND","THIRED","FOURED","FIRED"]]]]; thisArr(arr); console.log(new_arr); }
标签:his i++ this class asc span java var bsp
原文地址:https://www.cnblogs.com/tanjiyuan/p/12468368.html