How To Understand Leetcode Problems Javascript