leetcode 30 days js challenge
Easy
Create a class ArrayWrapper
that accepts an array of integers in it's constructor. This class should have two features:
+
operator, the resulting value is the sum of all the elements in both arrays.String()
function is called on the instance, it will return a comma separated string surrounded by brackets. For example, [1,2,3]
.Example 1:
Example 2:
Example 3:
Constraints:
0 <= nums.length <= 1000
0 <= nums[i] <= 1000
Note: nums is the array passed to the constructor
SheepThur, June 1, 2023