Convert integer to array?


#21

you convert x to a string and using split to cut it to array.
example:
x = 1234
=> x.to_s.split("")
result to run it: [“1”, “2”, “3”, “4”]