Join two arrays and put the remaining array elements into a new array?

var a=[
        [
          1
          2
          3
        ], [
           4
           5
           6
        ]
    ];
var b= [
    [78910], 
    [11121314], 
    [15161718],
    [19202122]
];

concatenate each element in array a (1p2p3, etc.) with each array element in b ([7pcjcm9], [11p12pr 13p14], etc.) to produce a new array

c=[
[[1],[78910]],
[[2],[11121314]],
[[3],[15161718]],
[[4],[19202122]]
]

and a remaining d = [[5jue 6]] , how to write code?

Mar.18,2022

inspired by other respondents:

var _a = a.flat();
var c = b.map((v,k) => [[_a[k]],v])
var d = [_a.splice(b.length)]
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4759e-44c34.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4759e-44c34.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?