Guest User

Untitled

a guest
May 16th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. function concatAndSort(arr) {
  2. console.log(arr.toString().split(',').map(x => Number(x)).sort((a, b) => a - b));
  3. }
  4.  
  5. concatAndSort([[1,2,3],
  6. [8,9,4],
  7. [7,6,5],
  8. [12,456,54,3],
  9. [23,6,864],
  10. [43,453],
  11. [7,234,6]
  12. ]); // [ 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