title: What does parseInt do in the following function?
body: <p>The following function is designed to take numbers out of a string and then add those numbers. </p>
  
  <p>For example, you can enter a string like "What does the iphone6 cost in 2015?" and it should return 2021. </p>
  
  <p>I was able to do 90% of the function, but don't know what the parseInt() function does in the code. I know it is necessary to make it work. Any explanation would be appreciated. </p>
  
  <pre><code>  function sumFromString(str){
    var sum=0;
    var numbers=str.match(/\d+/g);
    if(numbers==null){
      return 0
     }
    for(var i=0;i&lt;numbers.length;i++){
    sum+=parseInt(numbers[i]);
     }
   return sum;
   }
  </code></pre>