Tell us what’s happening:
I am clueless on how to solve the problem. I’ve done RSA for the problem. And here is my last resort.
Below is my script. I tried to fill the object constructor with methods. I almost completed it. But i do not know what to do next!
Your code so far
var Person = function(firstAndLast) {
// Complete the method below and implement the others similarly
this.getFullName = function() {
return "";
};
return firstAndLast;
this.getFirstName = function() {
return firstName;
};
this.getLastName = function() {
return lastName;
};
this.setFirstName = function(first){
firstName = first;
};
this.setLastName = function(last){
lastName = last;
};
};
var bob = new Person('Bob Ross');
bob.getFullName();
bob.getFirstName();
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.