Total Number Of Leetcode Problems Javascript Array Slice