alternative solutions

using number --> string --> array , take_last_while