Hi. I do not understand why this is not an acceptable solution. It successfully returns every answer, but will not let me pass
Your code so far
var Person = function(firstAndLast) {
this.setFirstName = function(first) {
firstAndLast = firstAndLast.split(' ');
firstAndLast.splice(0,1,first);
firstAndLast = firstAndLast.join(' ');
};
this.setLastName = function(last) {
firstAndLast = firstAndLast.split(' ');
firstAndLast.splice(1,1,last);
firstAndLast = firstAndLast.join(' ');
};
this.setFullName= function(both) {
firstAndLast = both;
};
this.getFirstName = function() {
firstAndLast = firstAndLast.split(' ');
return firstAndLast[0];
};
this.getLastName = function() {
firstAndLast = firstAndLast.split(' ');
return firstAndLast[1];
};
this.getFullName = function() {
return firstAndLast;
};
};
var bob = new Person('Bob Ross');
bob.setFirstName("Haskell");
bob.getFullName();
Your browser information:
Your Browser User Agent is: ```Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:59.0) Gecko/20100101 Firefox/59.0
Link to the challenge:
https://www.freecodecamp.org/challenges/make-a-person