function solution(n) { let newArr = (n.toString().split("").reverse()) let answer = newArr.map((e,i)=>parseInt(e)) return answer } solution(12345)