# What means x\[\] = \[\] in p5.js

**URL:** https://discourse.processing.org/t/what-means-x-in-p5-js/9287
**Category:** Beginners
**Created:** [March 14, 2019, 1:21am UTC](https://discourse.processing.org/t/what-means-x-in-p5-js/9287 "2019-03-14T01:21:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vjjv](https://avatars.discourse-cdn.com/v4/letter/v/df705f/32.png) [@vjjv](https://discourse.processing.org/u/vjjv)
#### Post date: [March 14, 2019, 1:21am UTC](https://discourse.processing.org/t/what-means-x-in-p5-js/9287/1 "2019-03-14T01:21:49Z")

</div>

hi!  
im trying to translate some code from p5.js

```auto
var st = [];

function setup(){

for (var i=0; i<maxW; i++) {
		st[i]=[]; // what means this?
		bright[i]=[];
}

}

```

what means ? st is a two dimensional array!

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [March 14, 2019, 1:54am UTC](https://discourse.processing.org/t/what-means-x-in-p5-js/9287/2 "2019-03-14T01:54:34Z")

</div>

- The syntax `[]` creates an empty new Array.
- `st[i] = [];` ➡ creates an empty Array and then assign it to the Array _st_ at its index _i_.
- Thus, variable _st_ (and also _bright_) is a 2D Array w/ _maxW_ as the number of rows ➡ `st[maxW][]`.
