# Need help understanding why array in console.log is not displayed as expected

**URL:** https://discourse.processing.org/t/need-help-understanding-why-array-in-console-log-is-not-displayed-as-expected/43213
**Category:** Beginners
**Created:** [November 15, 2023, 8:43am UTC](https://discourse.processing.org/t/need-help-understanding-why-array-in-console-log-is-not-displayed-as-expected/43213 "2023-11-15T08:43:58Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [November 15, 2023, 9:06am UTC](https://discourse.processing.org/t/need-help-understanding-why-array-in-console-log-is-not-displayed-as-expected/43213/2 "2023-11-15T09:06:14Z")

</div>

> [@Strange access to data class](https://discourse.processing.org/t/strange-access-to-data-class/40063/6):
>
> Both outputs in my browser got the expected values: [1, 2, 3] & [3, 1, 2]. But b/c you’re printing an array, if a browser by chance delays the actual printing to the console, it’s possible that you’ll see the array’s most current values for all outputs. As a workaround you can extract the arrays values when printing it using the spread ... syntax: console.log(...myTest.groupe);

---

_[View the full topic](https://discourse.processing.org/t/need-help-understanding-why-array-in-console-log-is-not-displayed-as-expected/43213)._
