title: How to double these numbers in an array using recursion, rest/spread operators and destructuring?
body: <p>I recently completed a JavaScript challenge asking to return a new array with all the values of the initial array doubled.</p>
  
  <pre><code>const numbers = [1, 2, 3];
  
  function double() {
  
  }
  </code></pre>
  
  <p>Except that I was to include some ES6 topics of de-structuring and rest/spread operators as well as recursion. Well, I completed as best as I could to come to a solution. This was my solution:</p>
  
  <pre><code>const numbers = [1, 2, 3];
  
  function double(arr){
   const doubledNumbers = [];
   for (var i = 0; i &lt; arr.length; i ++){
    const dubba = arr[i];
    const bubba = dubba * 2;
     doubledNumbers.push(bubba);
   }
   return doubledNumbers;
  
  }
  </code></pre>
  
  <p><strong>The other requirement was to not use any array helper method (map, reduce etc)</strong>, so I did not use <code>map()</code>, but instead a <code>for</code> loop. However, I could not wrap my head around implementing de-structuring or rest/spread operators, concepts I thought I knew pretty well, never-mind recursion.</p>