Email or username:

Password:

Forgot your password?
Top-level
Rustem Zakiev 🔥

@mudasobwa my ugly shot:
.sort(
(a,b) => [a, b].map(
(e) => e.slice(2).split("-").map(
(i) => i.length < 2 ? "0" + i : i
).join("-")
).reduce((a, b) => a > b ? -1 : 1)
)

2 comments
Aleksei � Matiushkin

@willpraxis yeah, I thought about it, but I was unsure how JS wouls sort strings :)

Aleksei � Matiushkin

@willpraxis I get accustomed to that everything in Elixir is sortable in the expected way, including but not limited to arrays (lists) of four elements

Go Up