title: JavaScript function redefinition
body: <p>Is it possible to redefine a JavaScript function from within its own body. For example, could I do the following?</p>
  
  <pre><code>function never_called_again(args) {
    // Do some stuff
    never_called_again = function (new_args) {
      // Do some new stuff
    }
  }
  </code></pre>
  
  <p>Is the above valid and does it have the correct semantics? I don't want to create a new global variable with the old function name, because I'm trying to do this kind of thing not in the global scope, but from various object scopes, and I don't want name clashes when I redefine the function within those local scopes.</p>