How would you implement the join multiple arrays in JavaScript?
As an example,
[
    1, 2, 3, 4, 5, 6, 7, 8, 9
]
should return
[
    [ 1, 2 ],
    [ 2, 3 ],
    [ 3, 4 ],
    [ 4, 5 ],
    [ 5, 6 ],
    [ 6, 7 ],
    [ 7, 8 ],
    [ 8, 9 ]
]
How would you implement the join multiple arrays in JavaScript?
As an example,
[
    1, 2, 3, 4, 5, 6, 7, 8, 9
]
should return
[
    [ 1, 2 ],
    [ 2, 3 ],
    [ 3, 4 ],
    [ 4, 5 ],
    [ 5, 6 ],
    [ 6, 7 ],
    [ 7, 8 ],
    [ 8, 9 ]
]
