# Node - Red For Loop

**URL:** <https://discourse.nodered.org/t/node-red-for-loop/13589>\
**Category:** General\
**Created:** [23 July 2019 07:59 UTC](https://discourse.nodered.org/t/node-red-for-loop/13589 "2019-07-23T07:59:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![niko](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@niko](https://discourse.nodered.org/u/niko)\
**Post date:** [23 July 2019 07:59 UTC](https://discourse.nodered.org/t/node-red-for-loop/13589/1 "2019-07-23T07:59:28Z")

</div>

Can anyone see what mistake ive made in my for loop code, I want to display the 20 different beacons but at my output instead of getting the list of 20 beacons i am getting the last beacon spread out over 20 different outputs as "B","e","a","c","o","n","\_","0","2","undefined","undefined","undefined","undefined","undefined","undefined","undefined","undefined","undefined","undefined","undefined"

 ![For%20Loop](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e5fbc12d8588c60d004fe7848a90bf683ca23795.png)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [23 July 2019 08:04 UTC](https://discourse.nodered.org/t/node-red-for-loop/13589/2 "2019-07-23T08:04:37Z")

</div>

Post your flow, we cannot reverse engineer this. Or at least post the function node in code.  
I would start by defining namelist as an array: `[content]`, not `(content)`.

---

<div class="post-metadata">

**Author:** ![niko](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@niko](https://discourse.nodered.org/u/niko)\
**Post date:** [23 July 2019 08:10 UTC](https://discourse.nodered.org/t/node-red-for-loop/13589/3 "2019-07-23T08:10:09Z")

</div>

thats it that has fixed it i messed up by using the () brackets instead of the for an array thank you
