Created
July 21, 2019 02:59
-
-
Save lelouchB/189d4c80062dbf8b9614a20dc7ccc666 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let firstArray = [1, 2, 3, 'Shinchan'] | |
let secondArray = ['Nohara', 4, 5, 6] | |
let thirdArray = [7, 8, 9, 'Himawari'] | |
let combinedArray1 = [...firstArray, ...secondArray, ...thirdArray] | |
let combinedArray2 = [...secondArray, ...firstArray, ...thirdArray] | |
console.log('CombinedArray1 = ' + combinedArray1) | |
//Combined Array1 = 1,2,3,Shinchan,Nohara,4,5,6,7,8,9,Himawari | |
console.log('CombinedArray2 = ' + combinedArray2) | |
//Combined Array2 = 4,5,6,1,2,3,Shinchan,7,8,9 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment