title: JavaScript/jQuery - "Array" of Arguments - Possible?
body: <p>Doing some client-side JavaScript development, which requires me to call a client-side API which only accepts one parameter at a time (<em>cough, cough, facebook</em>).</p>
  
  <p>Basically i need to call an API method twice:</p>
  
  <pre><code>someFBApi.requestPerms('email')
  someFBApi.requestPerms('publish_stream')
  </code></pre>
  
  <p>Now, i have a wrapper function for this call which looks like this:</p>
  
  <pre><code>function requestPermission(permission, callback) {
   someFBApi.requestPerms(permission, callback);
  }
  </code></pre>
  
  <p>But the problem is, i have to call the function "requestPermission" twice from all over the place:</p>
  
  <pre><code>requestPermission('email', function(perm1granted) {
     requestPermission('publish_stream', function(perm2granted) {
        // do something with perm 1 and perm 2
  </code></pre>
  
  <p>I would like to be able to do this:</p>
  
  <pre><code>requestPermissions('email,publish_stream', function(firstPerm,secondPerm) {
     // do something with firstPerm, secondPerm
  </code></pre>
  
  <p>I know i have to call FB API twice (fine), but i want that 'doubling up' to occur in that function (not all over the place). Know what i mean?</p>
  
  <p>So, i'll accept an answer of two forms:</p>
  
  <ul>
  <li>Can i pass an array of strings, iterate through those? (maybe JSON?)</li>
  <li>Delimeted-string, then split the string in the function.</li>
  </ul>
  
  <p>Keep in mind the function returns a value indicating whether or not the permission was granted. So it needs to accept an array/delimited list of strings and return an array/delimited list of strings.</p>
  
  <p>The more simple the solution, the better. (jQuery fine)</p>