1var columns = ["Date", "Number", "Size", "Location", "Age"];
2var rows = ["2001", "5", "Big", "Sydney", "25"];
3var result = rows.reduce(function(result, field, index) {
4 result[columns[index]] = field;
5 return result;
6}, {})
7
8console.log(result);
9