Skip to content

Instantly share code, notes, and snippets.

@FabianoLothor
Created December 13, 2019 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FabianoLothor/5fdf5c0c8f0b63247d68440447202c0f to your computer and use it in GitHub Desktop.
Save FabianoLothor/5fdf5c0c8f0b63247d68440447202c0f to your computer and use it in GitHub Desktop.
const anyArr = [[1,2,[3,[6],5]],4];
console.log(anyArr.join(' ').replace(' ', ',').split(',').map(value => parseInt(value)).sort());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment