How to access Javascript object's member in a forEach or for iteration
<p>i have a object called numObj and I created a numArrary containing an array of numObj objects. 
When I try to use foreach to call its inner members, it turns out unaccessable. Why's that?</p>

<pre><code>   var numObj = function (num) {
        return {
            num:num
        }
    }
    var numArray = [];
    for (var i = 0; i &lt; 3; i++) {
        numArray[i] = numObj(i);
    }
    numArray.forEach(
        function () {
            alert(this.num); //undefined
        }
    );
</code></pre>

<p>Moreover when I get deeper level of inner objects, I lose my intellisense in VS. Any idea?</p>
