# Having trouble understanding why the information is not being passed correctly in p5js

**URL:** <https://discourse.processing.org/t/having-trouble-understanding-why-the-information-is-not-being-passed-correctly-in-p5js/30010>\
**Category:** Coding Questions\
**Created:** [May 10, 2021, 12:01pm UTC](https://discourse.processing.org/t/having-trouble-understanding-why-the-information-is-not-being-passed-correctly-in-p5js/30010 "2021-05-10T12:01:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bife](https://avatars.discourse-cdn.com/v4/letter/b/a4c791/32.png) [@Bife](https://discourse.processing.org/u/Bife)\
**Post date:** [May 10, 2021, 12:01pm UTC](https://discourse.processing.org/t/having-trouble-understanding-why-the-information-is-not-being-passed-correctly-in-p5js/30010/1 "2021-05-10T12:01:22Z")

</div>

I’ll start of by posting the link to the code:  
[https://editor.p5js.org/bsilva.aulas/sketches/T0NVv6ya4](https://editor.p5js.org/bsilva.aulas/sketches/T0NVv6ya4)

So this was something my teacher did in one of our classes, but didn’t finish, and hasn’t gone back to it, and I’m sitting here trying to figure out why the correct information isn’t passed to the CreatePanels function at line 107. The objective is to create multiple panels with 3 different arrays, but instead it creates 3 with the same array.

If anyone could help with this it would be gladly appreciated

---

<div class="post-metadata">

**Author:** ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)\
**Post date:** [May 10, 2021, 7:28pm UTC](https://discourse.processing.org/t/having-trouble-understanding-why-the-information-is-not-being-passed-correctly-in-p5js/30010/2 "2021-05-10T19:28:42Z")

</div>

Hi! Welcome to the forum!

First of all could you change the topic category to p5.js because Processing is for the Java environment?

> The objective is to create multiple panels with 3 different arrays, but instead it creates 3 with the same array.

I couldn’t quite get what you mean… what does the code do, and what is the expected result?
