Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function concatAndSort(arr) {
- console.log(arr.toString().split(',').map(x => Number(x)).sort((a, b) => a - b));
- }
- concatAndSort([[1,2,3],
- [8,9,4],
- [7,6,5],
- [12,456,54,3],
- [23,6,864],
- [43,453],
- [7,234,6]
- ]); // [ 1, 2, 3, 3, 4, 5, 6, 6, 6, 7, 7, 8, 9, 12, 23, 43, 54, 234, 453, 456, 864 ]
Add Comment
Please, Sign In to add comment