would like help understanding javascript throttle function
<p>A user on Stack Overflow posted a question related to overriding a native JS function. The question is <a href="http://stackoverflow.com/questions/14282739/should-i-worry-when-overriding-function-tostring-in-javascript">here</a> and this is the code:</p>

<pre><code>function throttle(fn, time) {
  var handle;

  var execute = function() {
    handle = null;
    fn.apply(this, arguments);
  };

  var throttled = function() {
    if(!handle) {
      handle = setTimeout(execute.bind(this), time);
    }
  };

  throttled.toString = function() {
    return fn.toString() + "\n// throttled to " + time + "ms";
  };

  return throttled;
}

var makeAjax = throttle(function(callback) {
  $.getJSON("/path", callback);
}, 500);
</code></pre>

<p>I have a pretty good handle (I think) on JavaScript, but there are some areas that remain very grey to me. I would like to know what is happening in this code?</p>

<p>I don't really understand what <code>bind</code> and <code>apply</code> are doing, or what the end result of this all would be. I've looked up <code>bind</code> and <code>apply</code> on Mozilla's JS documentation, but the "official" definition has done little to help me understand what they are doing in this context.</p>

<p>I appreciate your help!</p>
