Skip to main content
Commonmark migration
Source Link

#JavaScript, 21 bytes

JavaScript, 21 bytes

a=>a.sort(n=>(-1)**n)

Try it online

#JavaScript, 21 bytes

a=>a.sort(n=>(-1)**n)

Try it online

JavaScript, 21 bytes

a=>a.sort(n=>(-1)**n)

Try it online

Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#JavaScript, 21 bytes

a=>a.sort(n=>(-1)**n)

Try it online