Answer the question
In order to leave comments, you need to log in
How to put an array into another array without concatenating all elements?
var firstArray = ['cat', 'dog', 'elephant'];
var secondArray = ['blue', 'orange', 'grey'];
The end result should look like this:
var newArray = ['cat', 'dog', 'elephant', ['blue', 'orange', 'grey']];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question