title: converting all the numbers in a javascript array to 2 decimal places within a function
body: <p>I need to create a function to make all the numbers in an array to 2 decimal places</p>
  
  <pre><code>function convert(radi){
      var i = 0;
      while(radi !== null) {
          radi += radi[i].toFixed(2);
      }
      return  radi;
  }
  convert(radi);
  console.log(radi);
  convert(areas);
  console.log(areas);
  
  
  
      *
  </code></pre>