Subsequence And Subarray Javascript Error Cannot Find