# Make a Person issues

**URL:** <https://forum.freecodecamp.org/t/make-a-person-issues/449306>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [March 2, 2021, 7:40pm UTC](https://forum.freecodecamp.org/t/make-a-person-issues/449306 "2021-03-02T19:40:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Elias\_Sanchez](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jose_elias_sanchez/32/134623_2.png) [@Jose\_Elias\_Sanchez](https://forum.freecodecamp.org/u/Jose_Elias_Sanchez)\
**Post date:** [March 2, 2021, 7:40pm UTC](https://forum.freecodecamp.org/t/make-a-person-issues/449306/1 "2021-03-02T19:40:11Z")

</div>

**Tell us what’s happening:**  
Hey I have tried several things and it is still not wgoing through, any help on this?  
**Your code so far**

```js

var Person = function(firstAndLast) {
 // Only change code below this line
 // Complete the method below and implement the others similarly
 
 let fullName = firstAndLast;
// console.log(name.split(" ")[1],"here")
 let firstName = fullName.split(" ")[0]
 let lastName = fullName.split(" ")[1]
 //[0].split(" ");
 //console.log(arguments,"01");
 
 this.getFirstName= function(){
   return firstName;
 };

 this.setFirstName = function(firstName){
return firstName = firstName
 }

 this.getLastName = function (){
   return lastName 
 }
 this.setLastName = function(lastName){
return lastName = lastName
 }

 this.getFullName = function() {
   return fullName ;
 };

this.setFullName = function(fullName){
 return fullName = fullName;
}

};

var bob = new Person("Bob Ross");
console.log(bob.getFirstName())
console.log(bob.setFirstName("Haskell "),"first")
console.log(bob.setLastName("Ross"),"last"); 
console.log(bob.setFullName("Haskell Ross"),"fullname")

```

```
   **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:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [March 2, 2021, 7:57pm UTC](https://forum.freecodecamp.org/t/make-a-person-issues/449306/2 "2021-03-02T19:57:51Z")

</div>

What do the failing tests say? What else have you tried?

There is one thing that jumps out at me:

> [@Jose\_Elias\_Sanchez](#):
>
> ```auto
> this.setFirstName = function(firstName){
> return firstName = firstName
> }
> 
> ```

What is this method supposed to return?

---

<div class="post-metadata">

**Author:** ![Jose\_Elias\_Sanchez](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jose_elias_sanchez/32/134623_2.png) [@Jose\_Elias\_Sanchez](https://forum.freecodecamp.org/u/Jose_Elias_Sanchez)\
**Post date:** [March 2, 2021, 9:58pm UTC](https://forum.freecodecamp.org/t/make-a-person-issues/449306/3 "2021-03-02T21:58:57Z")

</div>

> [@ArielLeslie](#):
>
> What is this method supposed to return?

I am setting `firstName = firstName` oor assingning firstName to the name provid it by a user.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [September 1, 2021, 9:59am UTC](https://forum.freecodecamp.org/t/make-a-person-issues/449306/4 "2021-09-01T09:59:37Z")

</div>

Closed on September 1, 2021, 9:59am UTC

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