Using slice() to transform #<ListNode> in Array