1// Zipping two arrays into an object, better performance than map
2
3let labels = ['a', 'b', 'c']
4let values = [1, 2, 3]
5let out = {}
6for (var i = 0; i < labels.length; i++) {
7 out = { ...out, [labels[i]]: values[i] }
8 }
9console.debug(out);
10// { a: 1, b: 2, c: 3 }