title: pass a function as a parameter and then execute it in a jquery function
body: <p>I was wondering which is the way to make this simple (and maybe stupid) thing with jQuery.</p>
  
  <p>I have a function like this:</p>
  
  <pre><code>function setSomething() { 
      make some stuff; 
  }
  </code></pre>
  
  <p>and then another function like this: </p>
  
  <pre><code>generalFunction(par1, par2, par3) { 
      do other stuff; 
      execute function called in par3;    
  }
  </code></pre>
  
  <p>Well, if I write something like this it doesn't work: </p>
  
  <pre><code>c=setSomething(); 
  generalFunction(a, b, c);
  </code></pre>
  
  <p>So what's the way to call a function as a parameter of another function and then execute it inside?</p>
  
  <p>I hope I was clear enough.</p>
  
  <p>Any help will be appreciated.</p>
  
  <p>Thank you in advance for your attention.</p>