 <p>When you write:</p> <blockquote> <p>arr["Hello"]=...</p> </blockquote> <p>you are creating a new Object associated with the <code>arr</code> Array object, which does not affect the length of <code>arr</code>.</p> <p>You can achieve the same effect by writing:</p> <blockquote> <p>arr.Hello=...</p> </blockquote>