Intermediate Scripting: Make a Person

Ok, I know what a constructor function is, I know what setter and getter are. But I have no f** idear, what I have to do in this challenge. The Problem Explanation isnt usefull too.
So I have also still no code. Maybe someone can help me.


var Person = function(firstAndLast) {
// Only change code below this line
// Complete the method below and implement the others similarly
this.getFullName = function() {
  return "";
};
return firstAndLast;
};

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0.

Challenge: Make a Person

Link to the challenge:

Hi. It might be helpful to review this lesson on constructors:

This lesson and the following lessons explain how constructors work and how to add methods to objects.


So in this case you need to add 6 methods (the first has been started) that let you get and set the first, last, and full name of this person object.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.