js 把二维数组中指定元素提出,与其余元素组成新的数组答:let list = [ { id: "247", order_number: "21251", name: "张三", tel: 13911111, color: "黑色", weight: "10kg" }, { id: "248", order_number: "21251", name: "张三", tel: 13911111, color: "白色", weight: "13kg" ...
js中怎么去掉数组的空值,不知道是第几个,只要是空值就删除答:不知道这个效果是否达到要求: var array = [1,2,,,4,6,,,55]; alert(array) for(var i = 0 ;i<array.length;i++) { if(array[i] == "" || typeof(array[i]) == "undefined") { array.splice(i,1); i= i-1; } } alert(array) ...