Created
April 24, 2018 02:17
-
-
Save mgmgpyaesonewin/d07955823d1edf0d38fa5cd643fa997a to your computer and use it in GitHub Desktop.
Flattern JS Array
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
let res = [ [ 8, 5, 11 ], [ 6, 3, 9 ] ] | |
res = [].concat(...res); | |
return res; | |
// output -> [ 8, 5, 11, 6, 3, 9 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment