title: Dynamic variables and params name in nodeJS
body: <p>i have this code that works well</p>
  
  <pre><code>var name_1 = request.body.agentname_1;
  var name_2 = request.body.agentname_2;
  var name_3 = request.body.agentname_3;
  ...
  var name_999 = request.body.agentname_999;
  </code></pre>
  
  <p>I want to reduce lines of code by using "For" loop.
  I tried this but i got error, any help plaise ? thank you</p>
  
  <pre><code>for (i = 1; i &lt;= 999; i++) { 
      global['name_'+i] = request.body.global['agentname_'+i]
  }
  </code></pre>