Run the tests to see the expected output for each method. The methods that take an argument must accept only one argument and it has to be a string. These methods must be the only available means of interacting with the object.
var Person = function(firstAndLast) {
// Complete the method below and implement the others similarly
you are not changing anything, just returning values
you need a variable to store the name inside Person and change the value of this variable using the various set methods and return values from this variable with the get methods
I meant how do I access the first name and last name. let’s say am using an array so how do i access them. Can I access as arguments or how do I split them and obtain them in parts
Consider going back and redoing the object oriented programming section. The goal of the set methods is to change the value of variables that live inside the object, and the goal of the get methods is to return the value of those variables.
I.e the set methods don’t need to return anything and should go something like this…