this should be working ???
Your code so far
[spoiler]
var Person = function (firstAndLast) {
// Complete the method below and implement the others similarly
this.getFullName = function () {
var array = firstAndLast.split(" ");
this.getFirstName = function () {
return array[0];
}
this.getLastName = function () {
return array[1];
}
this.getFullName = function () {
return array[0] + " " + array[1]
};
this.setFirstName = function (first) {
array[0] = first;
};
this.setLastName = function (last) {
array[1] = last;
};
this.setFullName = function (firstAndLast) {
var arraySplit = firstAndLast.split(" ");
this.setFirstName(arraySplit[0]);
this.setLastName(arraySplit[1]);
};
};
};
[/spoiler]
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person/