Copy and change javascript function scope
<p>Is there any way to copy a JavaScript function Scope to another function?</p>

<pre><code>(function(v){
     var Ct=v.Ct=function(){
     }
     var a="asdf";

     Ct.prototype.fun=function(){
          console.log(a);    //prints 'asdf'
     }
})(window)

--------------------------------------------------
</code></pre>

<p>the above code cannot be changed:</p>

<p>how to rewrite Ct.prototype.fun to make it print 'asdfasdf'</p>

<p>the following example can not get "a"</p>

<pre><code>Ct.prototype.fun=function(){
    console.log(a+a);   //It's not work
}

var o=new Ct();
o.fun();
</code></pre>
