title: addition of values in node.js
body: <p><a href="https://i.stack.imgur.com/9Pow1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Pow1.png" alt="enter image description here"></a></p>
  
  <p>above is result of below snippet of code</p>
  
  <pre><code> var total_points = 0
  for(var i = 0; i &lt; req.body.requisites.length; i++){
  
      total_points = total_points + req.body.requisites[i].points
      console.log(req.body.requisites[i].points ,  total_points)
  }
  console.log('total points :' + total_points)
  req.body.points = total_points
  </code></pre>
  
  <p>I am not getting why one time it is concatenating the results (see the last values before 'total points') and next time it calculates correctly.</p>
  
  <p>Appreciated if you can help.</p>
  
  <p>Thanks in advance!</p>