react.js foreach variable error
<p>Why do I get record is not defined in the console? It also doesnt print any value</p>

<pre><code>this.props.records.forEach(function(record){ 
      numbers.push(        
        &lt;tr key={record.id} &gt;
          &lt;td&gt;{record.title}&lt;/td&gt;
        &lt;/tr&gt;)
      })
</code></pre>

<p>Error in console</p>

<pre><code>Uncaught ReferenceError: record is not definedReact.createClass.onChange @ Inline JSX script:137React.createClass.changeHandler @ Inline JSX script:82ReactClass.createClass._handleChange @ react-with-addons.js:9067executeDispatch @ react-with-addons.js:3307forEachEventDispatch @ react-with-addons.js:3295executeDispatchesInOrder @ react-with-addons.js:3316executeDispatchesAndRelease @ react-with-addons.js:2689forEachAccumulated @ react-with-addons.js:19368EventPluginHub.processEventQueue @ react-with-addons.js:2896runEventQueueInBatch @ react-with-addons.js:11161ReactEventEmitterMixin.handleTopLevel @ react-with-addons.js:11187handleTopLevelImpl @ react-with-addons.js:11273Mixin.perform @ react-with-addons.js:18340ReactDefaultBatchingStrategy.batchedUpdates @ react-with-addons.js:9613batchedUpdates @ react-with-addons.js:16573ReactEventListener.dispatchEvent @ react-with-addons.js:11367
</code></pre>