title: How are the results passed from a chrome.storage.sync callback? Clarity needed
body: <p>I am making a chrome extension that pulls information from storage and passes the results into the callback function. I am new to javascript and don't understand where the results variable is coming from.</p>
  
  <p>This below function requests a value from a key in the chrome storage:</p>
  
  <pre><code>function getProjectList(callbackfunc) { 
      chrome.storage.sync.get('proj_list', callbackfunc);
  }
  </code></pre>
  
  <p>This will be my callback function:</p>
  
  <pre><code>function alertResult(results){
      alert(results.key);
  }
  </code></pre>
  
  <p>Calling the functions:</p>
  
  <pre><code>getProjectList(alertResult);
  </code></pre>
  
  <p>My questions is, why is there a 'results' argument in the alertResult function? It can be named anything, but whatever argument name I enter is the results from the chrome.storage.sync.get request. </p>
  
  <p>Why does it suddenly appear only in that function? How does javascript "know" that the first argument is the result of the chrome request? </p>
  
  <p>I am asking because I want to pass an additional variable into the alertResult function but can't seem to because I think there can only be 1 results argument. </p>
  
  <p>I would like to say the below function, but it doesn't work. So I want to know why there can only be one argument in this function. </p>
  
  <pre><code>function alertResult(results, newVar){
      alert(results.key);
      alert(newVar);
  }
  </code></pre>
  
  <p>Can someone shine some light on this for me? New to javascript so a lot is still fuzzy. </p>