const obj = Object.assign({}, ...arr.map((n, i) => ({ [n]: arr2[i] })));
// или
const obj = arr.reduce((acc, n, i) => ({ ...acc, [n]: arr2[i] }), {});
const combine = (keys, values) =>
keys.reduce((acc, n, i) => (acc[n] = values[i], acc), {});
const obj = combine(arr, arr2);
body {
overflow-y: scroll;
}