JSFiddle - React, Tailwind, and code Playground

JavaScript

var a = ["a", "s", "d"]; //add or remove items
var b = ["q", "w", "e"]; //add or remove items

if(a.length>b.length) {
  var biggest = a.slice();
  var smallest = b.slice();
} else {
  var biggest = b.slice();
  var smallest = a.slice();
}

var c = biggest.map(function(num, i) {
  if(i < smallest.length) return num + " " + smallest[i];
  return num;
});

console.log(c);

//CHECK OUTPUT IN CONSOLE