Created
August 11, 2017 08:04
-
-
Save iamgoangle/0fc2b61ccd4e3b84cdd2f2d890349ab1 to your computer and use it in GitHub Desktop.
concatenate array
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
| const arrA = [1, 2, 3]; | |
| const arrB = [4, 5, 6]; | |
| arrA.push(...arrB); // [1, 2, 3, 4, 5, 6] | |
| let arrC = [1, 2, 3]; | |
| let arrD = [4, 5, 6]; | |
| arrC = [...arrC, ...arrD]; // [1, 2, 3, 4, 5, 6] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment