title: Is it possible to create a fixed length array in javascript?
body: <p>Is it possible, in Javascript, to create an array whose length is guaranteed to remain the same?</p>
  <p>For example, the array <code>A</code> is created with length 2.  Subsequently, any attempt to call <code>A.push()</code> or <code>A.pop()</code>, or set the value of <code>A[5]</code> will fail. <code>A.length</code> will always be 2.</p>
  <p>This is the way that typed arrays (eg <code>Float32Array</code>) already work. They have fixed size. But I want a way to get the same behaviour on a regular Array.</p>
  <p>For my specific situation, I would like to create a fixed-length array where each entry is an object. But I would still like to know the answer to the general question.</p>