This question already has an answer here:
var lines = new Array(“a”,”b”,”c”);
lines = new Array(“d”,”e”,”f”);
This is a quick example, i want to be able to combine them so that when the second line is read the 4th element in the array would return “d”
How would i do this?
var a = ['a','b','c']; var b = ['d','e','f']; var c = a.concat(b); //c is now an an array with: ['a','b','c','d','e','f'] console.log( c ); //c will be 'd'