Question: I have an array:

```
for (i = 0; i < this.platforms_values.length; i++){

    platform_project: [
         {owner_id: owner_id},
         {project_id: project_id},
    ]

    platform_project.push(this.platforms_values[i])
}

```

However it gives me this:

```
platform_project is not defined

```

Answer: 
Looks like you're doing 2 things wrong.

1) creating a new object at every instance of the loop

2) using a colon instead of an equals for assignment

```
const platform_project = [
     {owner_id: owner_id},
     {project_id: project_id},
];
for (let i = 0; i < this.platforms_values.length; i++) {        
    platform_project.push(this.platforms_values[i])
}

```
Assignment in JavaScript is done via `=`, not `:`. You only use `:` within an object literal. So:

```
platform_project = [
// −−−−−−−−−−−−−−^
     {owner_id: owner_id},
     {project_id: project_id},
]

```

You also need to declare your variables (`i`, `platform_project`) if you haven't already.

But see [Keenan Diggs' answer](https://stackoverflow.com/a/59036850/157247), it's not clear you really want to create that array *inside* the loop...

---

You might be wondering why you didn't get a syntax error from the `:` version. The reason is that the code parsed just fine, because `platform_project` was seen as a *label* for the following statement (you know labels, those things you can use on nested loops to direct a `break` or `continue` to the outer loop), and an array literal is a valid statement (because in JavaScript, all expressions are valid statements).