Given an input array having minimum length 2
and maximum length 9
having any initial values output an array having length 2
consisting of the 1-based indexes of the array represented as either an integer or string in forward and reverse order.
The values of the array or string do not matter and are ignored. For example:
[undefined,null] -> [12,21]
Test cases
Input -> Output
["a","e","i","o","u"] -> [12345,54321] // valid
[{"a":1},{"b":2},{"c":3}] -> [123,321] // valid
[-1,22,33,44,55,66,77,88,99] -> ["123456789","987654321"] // valid
[0,1] -> [01,10] // invalid, not a 1-based index, `01` is not a valid integer
[1999,2000] -> [12,"21"] invalid, output either integers or strings
Winning criteria
Least bytes.