I have a problem merging 2 arrays in an for loop see code:
function count_days(tijden,datums ){
var length = tijden.length;
element = null;
var similarities =0;
var backup = [];
var dateArray =[];
for (var i = 0; i <length; i++) {
element = tijden[i];
tijden[i] = element;
dateArray = getDates(new Date(tijden[i]['begin']), new Date(tijden[i]['eind']));
}
The problem is that when the code is running i get one array for each loop. I need to get one array with the data from all loops. I tryde concat but didnt get this to work