Important Array Leetcode Problems Javascript Code For Square