Leetcode Subarray Products Hackerrank Javascript Practice Test