# Argument with array

**URL:** <https://phaser.discourse.group/t/argument-with-array/8031>\
**Category:** Phaser 3\
**Created:** [November 5, 2020, 2:55pm UTC](https://phaser.discourse.group/t/argument-with-array/8031 "2020-11-05T14:55:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![espace](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/espace/32/1405_2.png) [@espace](https://phaser.discourse.group/u/espace)\
**Post date:** [November 5, 2020, 2:55pm UTC](https://phaser.discourse.group/t/argument-with-array/8031/1 "2020-11-05T14:55:06Z")

</div>

hi,

```
 var return_y_in_grid = (arr, n) => {
        let _y;
        arr.forEach((activity) => {
            activity.forEach((s) => {
                if (s.num === n) {
                    _y = s.y
                }
            });
        });
        return _y
    }

```

it works with this : return\_y\_in\_grid(e) // e is a 2d array  
and don’t works with this array in a table return\_y\_in\_grid(arr.e) [//arr.e](https://arr.e) is also a 2d array

How do i write this for working with ‘arr.e’ ?
