Cpp New Array Js Functions Practice