High order function with javascript trouble
<p>I want to be able to run the func n times with this createIterator function.</p>

<pre><code>var createIterator = function (func, n) {
  getDouble = function (x) {
    return x + x;
  };

  return getDouble * n;
};
</code></pre>

<p>I want to be able to do this with the code:</p>

<pre><code>var getQuad = createIterator(getDouble, 2);
getQuad(2) //8
</code></pre>

<p>Here are the tests is needs to pass:</p>

<pre><code>Test.describe("Iterator for 'getDouble' function", function() {
  var getDouble = function (n) {
  return n + n;
  };

  Test.it("Running the iterator for once", function() {
    var doubleIterator = createIterator(getDouble, 1);

    Test.assertEquals(doubleIterator(3), 6, "Returns double of 3 as 6");
    Test.assertEquals(doubleIterator(5), 10, "Returns double of 5 as 10");
  });

  Test.it("Running the iterator twice", function() {
    var getQuadruple = createIterator(getDouble, 2);

    Test.assertEquals(getQuadruple(2), 8, "Returns quadruple of 2 as 8");
    Test.assertEquals(getQuadruple(5), 20, "Returns quadruple of 5 as 20");
   });
});
</code></pre>

<p>I have been at this for awhile and have not been able to figure this out. Any help would be awesome. Thanks!</p>