# \[Solved\] How can I iterate through a list?

**URL:** <https://community.thunkable.com/t/solved-how-can-i-iterate-through-a-list/1647247>\
**Category:** Questions about Thunkable X\
**Tags:** beginner, list\
**Created:** [December 5, 2021, 11:41pm UTC](https://community.thunkable.com/t/solved-how-can-i-iterate-through-a-list/1647247 "2021-12-05T23:41:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalasernakoqnu](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@dalasernakoqnu](https://community.thunkable.com/u/dalasernakoqnu)\
**Post date:** [December 5, 2021, 11:41pm UTC](https://community.thunkable.com/t/solved-how-can-i-iterate-through-a-list/1647247/1 "2021-12-05T23:41:56Z")

</div>

I’d like to make a list of narration where a new piece of text appears once Label1 is clicked. Currently nothing happens when I click label 1. I’d like it so that for example, label1 is clicked and the text “Hey you.” appears, then the next time you click label one the text “What are you doing?” appears. Any help is appreciated.

 ![260956284_974567696488448_248900602616900420_n (1)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/8/28518fb1196b13da0252d76b4cc727ec5ededfdf.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [December 5, 2021, 11:51pm UTC](https://community.thunkable.com/t/solved-how-can-i-iterate-through-a-list/1647247/2 "2021-12-05T23:51:46Z")

</div>

You will need to use a list index value to do this. If the idea of a [list index](https://docs.thunkable.com/lists#select-from-a-list) is unfamiliar to you, you can name this variable anything you like (“Narration speech count” or “dialogue sentence number”, etc.).

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/8/6899911d1ab60335e9380b52485787aaa59cadb2.png)

**Note:** this will return “undefined” if the `narration index` is larger than the number of items (3) in the list. You can prevent that using an if/then block:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/6/36ad93139c956db0dee95dd3dbf6282332e8ac5d.png)

---

<div class="post-metadata">

**Author:** ![dalasernakoqnu](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@dalasernakoqnu](https://community.thunkable.com/u/dalasernakoqnu)\
**Post date:** [December 6, 2021, 12:15am UTC](https://community.thunkable.com/t/solved-how-can-i-iterate-through-a-list/1647247/3 "2021-12-06T00:15:16Z")

</div>

this worked, thank you so much

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [March 6, 2022, 12:16am UTC](https://community.thunkable.com/t/solved-how-can-i-iterate-through-a-list/1647247/4 "2022-03-06T00:16:03Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
