Unregistered member of array in length property JS
<p>I came across this code that is used to keep both forward and reverse reference in an array:</p>

<pre><code>var arr = [];
arr[arr['A'] = 0] = 'A';
arr[arr['B'] = 1] = 'B';

// On node interpreter
arr        // [ 'A', 'B', A: 0, B: 1 ]
arr["A"]   // 0
arr["B"]   // 1
arr[0]     // 'A'
arr[1]     // 'B'
arr[2]     // 'undefined'
arr.length // 2
</code></pre>

<p>The <code>A: 0, B: 1</code> members get pushed to the end of the array.</p>

<p>What are these members and what happened in the process so that <code>.length</code> property recorded 2 instead of 4?</p>