# I get a blank screen on first item when I setText for a list

**URL:** <https://forum.code.org/t/i-get-a-blank-screen-on-first-item-when-i-settext-for-a-list/35799>\
**Category:** Unit and Lesson Discussion\
**Created:** [January 30, 2022, 6:54am UTC](https://forum.code.org/t/i-get-a-blank-screen-on-first-item-when-i-settext-for-a-list/35799 "2022-01-30T06:54:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lohalloran](https://avatars.discourse-cdn.com/v4/letter/l/d2c977/32.png) [@lohalloran](https://forum.code.org/u/lohalloran)\
**Post date:** [January 30, 2022, 6:54am UTC](https://forum.code.org/t/i-get-a-blank-screen-on-first-item-when-i-settext-for-a-list/35799/1 "2022-01-30T06:54:26Z")

</div>

When I want to display a list on a screen using a loop, the first item is blank. What am doing wrong.

Here is my program: [App Lab - Code.org](https://studio.code.org/projects/applab/adgmMYwnvkdx-pPYkVsV9uM7QnOLqgK7X4E1Ct301zw)

---

<div class="post-metadata">

**Author:** ![jdonwells](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jdonwells/32/7900_2.png) [@jdonwells](https://forum.code.org/u/jdonwells)\
**Post date:** [January 30, 2022, 11:47am UTC](https://forum.code.org/t/i-get-a-blank-screen-on-first-item-when-i-settext-for-a-list/35799/2 "2022-01-30T11:47:28Z")

</div>

`updateScreen` is called when “nextDog” is clicked. You never call it for the first dog.

---

<div class="post-metadata">

**Author:** ![lohalloran](https://avatars.discourse-cdn.com/v4/letter/l/d2c977/32.png) [@lohalloran](https://forum.code.org/u/lohalloran)\
**Post date:** [January 30, 2022, 1:53pm UTC](https://forum.code.org/t/i-get-a-blank-screen-on-first-item-when-i-settext-for-a-list/35799/3 "2022-01-30T13:53:53Z")

</div>

Thank you, that’s it!

---

<div class="post-metadata">

**Author:** ![lohalloran](https://avatars.discourse-cdn.com/v4/letter/l/d2c977/32.png) [@lohalloran](https://forum.code.org/u/lohalloran)\
**Post date:** [January 30, 2022, 2:50pm UTC](https://forum.code.org/t/i-get-a-blank-screen-on-first-item-when-i-settext-for-a-list/35799/4 "2022-01-30T14:50:22Z")

</div>

Now I get an error at the end of the list. Help.

> **[Check out what I made](https://studio.code.org/projects/applab/adgmMYwnvkdx-pPYkVsV9uM7QnOLqgK7X4E1Ct301zw)**
>
> I wrote the code myself with Code.org

---

<div class="post-metadata">

**Author:** ![jdonwells](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jdonwells/32/7900_2.png) [@jdonwells](https://forum.code.org/u/jdonwells)\
**Post date:** [January 31, 2022, 2:03pm UTC](https://forum.code.org/t/i-get-a-blank-screen-on-first-item-when-i-settext-for-a-list/35799/5 "2022-01-31T14:03:28Z")

</div>

What is the maximum that number should be?

```auto
  if (number < breed.length) {

```
