I want to merge two arrays in Javascript like this:
['First', 'Third', 'Fifth', 'Seventh', 'Ninth']
['Second', 'Fourth', 'Sixth', 'Eigth']
=> ['First', 'Second', 'Third', 'Fourth',...]
Also One array can have more elements than another one. So for example:
['E1', 'E2', 'E3']
['E4']
=> ['E1', 'E4', 'E2', 'E3']
What is the easiest way to do this?
I don't really have in idea how to do this.
note: I have underscorejs available.