So I am trying to combine two arrays but I think all that I've read here is different than what I want to achieve. So here are my initial arrays:
oldArray = ['name','age','address','number'];
firstArray = ['Peter Parker','16','Queens','123456789']; // this is dynamic but will still have the same set nonetheless.
so what I want to do is combine them into this:
heroList = ['name','age','address','number'],['Peter Parker','16','Queens','123456789'];
So I've tried combining them using concat() method and it was producing the wrong output so Im wondering how I should format them to combine to my desired output.
heroList = [['name','age','address','number'],['Peter Parker','16','Queens','123456789']];- which is simplyheroList = [oldArray, firstArray]