Try to work with Javascript&#x27;s arrays, it&#x27;s a nightmare.<p>Fun fact:<p><pre><code>  let list = new Array(5);
  list.forEach(() =&gt; { console.log(&quot;foo&quot;); })
</code></pre>
Will display nothing, if you want to properly initialize an array with a defined length, you have to do:<p><pre><code>  let list = Array.apply(null, Array(5)).map(function () {})
</code></pre>
I make web games in Typescript, and I get all sorts of problems like this everytime I have to work with 2D arrays, problems that I don&#x27;t get when I do games in C# with Unity. Unity&#x27;s modified Javascript actually implements better arrays and recommends not using Javascript&#x27;s native arrays: <a href="http:&#x2F;&#x2F;docs.unity3d.com&#x2F;ScriptReference&#x2F;Array.html" rel="nofollow">http:&#x2F;&#x2F;docs.unity3d.com&#x2F;ScriptReference&#x2F;Array.html</a>