Created
January 11, 2019 09:05
-
-
Save 6ui11em/095527b16050aa73e3a2a74bf00e7b7a to your computer and use it in GitHub Desktop.
Javascript merge arrays #javascript #js #array #merge
This file contains hidden or 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
var sandwiches1 = ['turkey', 'tuna', 'blt']; | |
var sandwiches2 = ['chicken', 'pb&j', 'tuna']; | |
var allSandwiches = sandwiches1.concat(sandwiches2); | |
// sandwiches1: ['turkey', 'tuna', 'blt'] | |
// sandwiches2: ['chicken', 'pb&j', 'tuna'] | |
// allSandwiches: ['turkey', 'tuna', 'blt', 'chicken', 'pb&j', 'tuna'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment