# Make a Person help

**URL:** <https://forum.freecodecamp.org/t/make-a-person-help/321945>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [October 15, 2019, 2:32pm UTC](https://forum.freecodecamp.org/t/make-a-person-help/321945 "2019-10-15T14:32:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![royalgreen50](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/royalgreen50/32/112625_2.png) [@royalgreen50](https://forum.freecodecamp.org/u/royalgreen50)\
**Post date:** [October 15, 2019, 2:32pm UTC](https://forum.freecodecamp.org/t/make-a-person-help/321945/1 "2019-10-15T14:32:12Z")

</div>

this should be working ???

**Your code so far**

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

> **[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:** [October 15, 2019, 2:38pm UTC](https://forum.freecodecamp.org/t/make-a-person-help/321945/2 "2019-10-15T14:38:09Z")

</div>

What do the failing tests say? What different things have you tried? Have you been able to narrow down the problem at all?

---

<div class="post-metadata">

**Author:** ![jlewis](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@jlewis](https://forum.freecodecamp.org/u/jlewis)\
**Post date:** [October 15, 2019, 2:41pm UTC](https://forum.freecodecamp.org/t/make-a-person-help/321945/4 "2019-10-15T14:41:27Z")

</div>

It looks like you aren’t saving the array anywhere. In this.getFullName, you save array in the method, but that will only get scoped to that method, not the overall object.

Also, not entirely sure about the this.setFirst/LastName functions. It seems as if you’re setting the array index to a first and a last, but if you’re passing firstAndLast to the constructor, where are you going to be able to get first and last from?

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 25, 2021, 11:57am UTC](https://forum.freecodecamp.org/t/make-a-person-help/321945/5 "2021-01-25T11:57:42Z")

</div>

Closed on January 25, 2021, 11:57am UTC


