Please i need help... algorithm scripting(make a person) challenge

hey guys please i need some insights on how to make this code pass all the tests. My code passes all the tests but one.

var Person = function(firstAndLast) {
  // Complete the method below and implement the others similarly
  var firstName = 'Bob';
  var lastName = 'Ross';
  this.getFullName = function() {
    return firstName + " " + lastName;
  };
  this.getLastName = function(){
    return lastName;
  }
  this.getFirstName = function() {
    return firstName;
  }
  this.setFirstName = function(newFirstName){
     firstName = newFirstName;
  }
  this.setLastName = function(newLastName){
     lastName = newLastName;
  }
  this.setFullName = function(newFullName){
    firstName = newFullName.split(" ")[0];
    lastName = newFullName.split(" ")[1];
  }
  return firstAndLast;
};

var bob = new Person('Bob Ross');
bob.getFullName();

And this is the only test it is not passing

bob.getFullName() should return "Haskell Curry" after bob.setLastName("Curry").

This is part of your problem. Your function has a parameter named firstAndLast. This is because your function should be able to accept a first and last name separated by a space. You should not be setting this manually, otherwise, you could not create a new person like:

var john = new Person('John Adams');

You need to rethink your logic with this new information.

Hint: You do not need to change any of the code in your methods. You just need to make use of firstAndLast to initialize firstName and lastName.

oh… alright… let me go back to the code and try to implement this

I have implemented what you suggested and it worked… Thanks man… here is the code

var Person = function(firstAndLast) {
  // Complete the method below and implement the others similarly
  var firstName = firstAndLast.split(" ")[0];
  var lastName = firstAndLast.split(" ")[1];
  this.getFullName = function() {
    return firstName + " " + lastName;
  };
  this.getLastName = function(){
    return lastName;
  }
  this.getFirstName = function() {
    return firstName;
  }
  this.setFirstName = function(newFirstName){
     firstName = newFirstName;
  }
  this.setLastName = function(newLastName){
     lastName = newLastName;
  }
  this.setFullName = function(newFullName){
    firstName = newFullName.split(" ")[0];
    lastName = newFullName.split(" ")[1];
  }
  return firstAndLast;
};

var bob = new Person('Bob Ross');
bob.getFullName();

Glad you figured it out. My only suggestion is to not repeat the following:

    firstName = newFullName.split(" ")[0];
    lastName = newFullName.split(" ")[1];