java script zip function

Java
// Zipping two arrays into an object, better performance than map

let labels = ['a', 'b', 'c']
let values = [1, 2, 3]
let out = {}
for (var i = 0; i < labels.length; i++) {
    out = { ...out, [labels[i]]: values[i] }
 }
console.debug(out);
// { a: 1, b: 2, c: 3 }
Source

Also in Java: