JSFiddle - React, Tailwind, and code Playground
by Josh Pullen
JavaScript
let first = ["a", "b", "c"];
let second = [1, 3, 2];
let combined = [];
for (let i = 0; i < first.length; i++) {
combined.push({
letter: first[i],
number: second[i]
});
}
console.log(combined);
// Then sort `combined`!