title: How do I pass a function(delegate?) as a parameter to another function in Javascript and then use it
body: <p>I want to pass a function to another function. I think functions being passed like that are call delegates? I am having a hard time finding a good explanation for this kind of thing online. Is this the right way to do this?  </p>
  
  <pre><code>function getCellContentByColumnIndex = function(row, index) {
      return $(row.children().get(index)).text();
  }
  function naturalSort(a, b, func) {
      //...
      var $a = func(a);
      var $b = func(b);
      //...
  }
  
  //usage  
  naturalSort(x, y, getCellContentByColumnIndex);
  </code></pre>