/es6 - spread operator - 3.js Secret
Created
March 27, 2019 23:14
es6 - spread operator - 3.js
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
var arr1 = [1, 2]; | |
var arr2 = [3, 4, 5]; | |
var mergedArr = arr1.concat(arr2); | |
console.log(mergedArr); // ouputs [1,2,3,4,5] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment