function arrcat(arr1,arr2){
if(!Array.isArray(arr1) || !Array.isArray(arr2) || arr1.length != arr2.length) return [];
var arr = [];
for(var i = 0,len = arr1.length;i
obj[arr1[i]] = arr2[i];
arr[i]=obj;
}
return arr;
}
arrcat(["a","b","c","d"],[1,2,3,4]);//结果:[{a:1},{b:2},{c:3},{d:4}]