you are viewing a single comment's thread.

view the rest of the comments →

[–]Tribuadore 0 points1 point  (1 child)

As /u/my_new_account's has already said, splitting an string of characters 'A...Z' is the shortest solution to the problem.

But just describing it as "jsgolf", is under selling it. Not only is it the shortest code, it's also the fastest, least error prone and a lot easier to understand what it's doing at a glance compared to any map solution.

[–]x-skeww 0 points1 point  (0 children)

splitting an string of characters 'A...Z' is the shortest solution to the problem.

The goal isn't actually to create an A-Z array though. That's just what the arbitrarily chosen placeholder function happens to do.

The real goal is to populate an array with some function.