Cpp New Array Javascript Length