Created
October 2, 2022 18:31
-
-
Save javierd79/947aa8ad700a7a0a6bd1ba3fe482dcfd to your computer and use it in GitHub Desktop.
Concat two different arrays
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
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