Set value into object with function (java script)
<p>When I used getFullName, getFirstName and getLastName work ok, but I can't use set functions setFullName, setLastName, setFirstName. My code:</p>

<pre><code>var Person = function(firstAndLast) {
    var fn=firstAndLast.split(' ');
    var fstr=fn.join(' ');
    var frn=fn[0];
    var lsn=fn[1];

    this.getFullName=function(){return fstr;};
    this.getFirstName=function(){return frn;};
    this.getLastName=function(){return lsn;};
    this.setFirstName=function(a){fn[0]=a;};
    this.setLastName=function(b){fn[1]=b;};
    this.setFullName=function(c){fn=c.split(' ');};

};
</code></pre>