title: pass an expression to a javascript function
body: <p>I have the following code from a javascript book and the callback seems to be passed an expression as an argument. Is that the case or am I seeing this wrong? I didnt know, even though it works, that that was possible.</p>
  
  <pre><code>function multiplybytwo(a,b,c,callback)  {
    var i, ar =[];
    for(i=0;i&lt;3;i++)  
    {
      ar[i] = callback(arguments[i]*2);  
    }
    return ar;  
  }  
  
  function addone(a)  {
    return a+1;  
  } 
  
  myarr =multiplybytwo(1,2,3,addone);
  </code></pre>