Suppose we have two arrays
var arrayOne = [21.03.2016, 22.03.2016, 23.03.2016]
var arrayTwo = [23.45, 34.45, 25.76]
How can we join it so that it becomes
var joinedResultOfOneandTwo = [[21.03.2016, 23.45],
[22.03.2016, 34.45],
[23.03.2016, 25.76]]
Note It is important that we do not change the type of variables both of them should be numbers.
This is what I have tried:
for (var i = 0; i < arrayOne.length; i++) {
var clintonValues = arrayOne[i].concat(arrayTwo[i])
}
returns:
TypeError: arrayOne[i].concat is not a function