Skip to content

Instantly share code, notes, and snippets.

@javierd79
Created October 2, 2022 18:31
Show Gist options
  • Save javierd79/947aa8ad700a7a0a6bd1ba3fe482dcfd to your computer and use it in GitHub Desktop.
Save javierd79/947aa8ad700a7a0a6bd1ba3fe482dcfd to your computer and use it in GitHub Desktop.
Concat two different arrays
function concatArrays (firstArr, secondArr) {
return [...firstArr, ...secondArr]
}
concatArrays ([1,2,3], ["Hello world!", "Mondongo"])
// [ 1, 2, 3, 'Hello world!', 'Mondongo' ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment