title: List of global user defined functions in JavaScript?
body: <p>Is it possible to get a list of the user defined functions in JavaScript?</p>
  
  <p>I'm currently using this, but it returns functions which aren't user defined:</p>
  
  <pre><code>var functionNames = [];
  
  for (var f in window) {
      if (window.hasOwnProperty(f) &amp;&amp; typeof window[f] === 'function') {
          functionNames.push(f);
      }
  }
  </code></pre>