daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest May 16th, 2018 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top