title: JavaScript function pointer problem
body: <p>just starting out with JavaScript and jQuery, and i have this problem:</p>
  
  <pre><code>foo(validation);
  
  function foo(func) {
    var time = new Date().getTime();
    // do some other stuff
    func("foobar" + time);
  }
  
  function validation(elementName) {
    // do stuff
  }
  </code></pre>
  
  <p>but when i call function foo with the validation function pointer, i would also like to pass in the string "foobar" at that point.</p>