Javascript: Accessing member variable (array) of a class in member functions
<p>I am trying to access a member variable of a class which is an array in member function of a class but getting an error:</p>

<blockquote>
  <p>Can not read property <code>'length'</code> of undefined</p>
</blockquote>

<p>Class:</p>

<pre><code>function BasicArgs(){
  var argDataType = new Uint8Array(1);
  var argData = new Uint32Array(1);
}
</code></pre>

<p>Member function:</p>

<pre><code>BasicArgs.prototype.getByteStreamLength = function(){
  alert(this.argData.length);
  return i;
}
</code></pre>

<p>This is one of the example but i have come across this at many places.
variables like integer are easily accessible but most of the times problem is with arrays.
Help would be appreciated.</p>
