Cpp Create Empty Array Javascript Iteration Method