C++ function prototype equivalent in javascript?
<p>So I want to call function B in function A, but function B is fully declared after function A.  I know that in c++ we'd use function prototypes on B, but what about javascript?</p>

<p>code:</p>

<pre><code>markerArray = function() {
    // some code here
    this.array = [];
    this.clearArray = function() {
        for(var i = 0; i&lt;this.getLength(); i++)
            // for loop code
    }
    this.getLength = function() {
        return this.array.length;
    }
    // some code here
}
</code></pre>

<p>these reason why I put this.getLength below is mainly because my coding style/structure is more readable this way</p>
