title: How to document a function returned by a function using JSDoc
body: <p>I am using JSDoc for parameter documentation.</p>
  
  <p>It is clear how to document the parameter types for <code>many_prompts</code>, but what is the right way to document the function it returns?</p>
  
  <pre><code>/**
   * @param {Number} - number of times to prompt
   * @return {Function(prompt{Number})} - the returned function
   */
  function many_prompts(count) {
    return function(prompt) {
      for(var i=0; i &lt; count; i++) alert(prompt);
    }
  }
  
  
  //Example of use:
  var y  =many_prompts(3);
  y('Hello World');
  </code></pre>