Leetcode Insert Into Array Javascript Append Element