title: Passing Params to a Window[callback] Function
body: <p>I have some code that requests some JSON from an API. When data is returned, per the documentation, it sends back a callback function that is to be used to parse the data at the top level. After the call is made, I have the following code to capture the data and process it:</p>
  
  <pre><code>var callback = 'functionUsedInApiCall';
  window[callback] = newCallBackFunction;
  </code></pre>
  
  <p>How would I go about passing custom params to the callback function above as the data is being returned?</p>
  
  <p>In order to capture the data, I must write the callback function like this:</p>
  
  <pre><code>function newCallBackFunction(root) {
     //root is the data
  }
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>