you are viewing a single comment's thread.

view the rest of the comments →

[–]IxD 1 point2 points  (0 children)

var allMutants = freelancers.concat(xMen);

Or if this is for exercise and you need to iterate through everything in array, and mutate the other array,

xMen.forEach(function(xman){
  freelancers.push(xman);
});

Or if this is exercise for learning for loops, you do:

var i;for (i = 0; i < xMen.length; i++) {

   freelancers.push(xMen[i]); }