title: create copy of already made function with new parameters?
body: <p>I have a function <code>freq01()</code>, when a button is clicked I want a <code>function(new)</code> to create a copy of function <code>freq01()</code>, with new parameters. I have no idea where to start or if JS can create a function from a function.</p>
  
  <p>All variables have been created. Please point me in the right direction...!</p>
  
  <p>The code below is to save the checked radio button value to an array.</p>
  
  <pre><code>function freq01(){
    if (document.getElementById("w01").checked){
     incFreq = document.getElementById("w01").value;
    }
    else if (document.getElementById("f01").checked){
     incFreq = document.getElementById("f01").value;
    }
    else if (document.getElementById("m01").checked){
     incFreq = document.getElementById("m01").value;
    }
  }
  </code></pre>