39
3
Display the 12 numbers on a clock face exactly like this:
12
11 1
10 2
9 3
8 4
7 5
6
To better see the grid, here's one with dots:
...........12............
.....11...........1......
.........................
.10...................2..
.........................
.........................
9.......................3
.........................
.........................
..8...................4..
.........................
......7...........5......
............6............
Note that the grid is stretched in width by a factor of two to make it look more square.
Also note that two-digit numbers are aligned with their ones digit in place. The 9 digit should be flush against the left.
Return or print the result as a multiline string (not a list of lines). Any trailing spaces are optional. The final newline also optional.
4I love the use of Buffer() as alternative to
charCodeAt()
– Downgoat – 2018-08-09T18:32:45.4431@Downgoat Which makes me wonder if we should have a Tips for golfing in Node.js question, for Node specific features. Not sure it's worth it, though. – Arnauld – 2018-08-09T22:09:28.080
Maybe add a separate answer that contains all the Node specific features, or at least a list linking all the different answers? – None – 2018-08-11T13:25:21.490