‘16-‘17 General Discussion for Lesson 5.13


Use this thread to discuss your questions and comments about how to run the lesson.


I’m having a difficult time with Stage 13, starting at “bubble” 24. I’m not sure exactly of how to start this activity. Any help would be appreciated. I was able to establish the initial array. Here’s the code I created for bubble 23:

var favoriteThings = [“Family”, “Packers”, “Technology”];
setText(“messageArea”, favoriteThings[0]);
setText(“pageNum”, favoriteThings.length);

Thanks in advance!



Nick, I’m looking at the lesson now. I’ll post a response shortly.


Stage 24 is asking you to do a few things to add interactivity to the app.

  1. Create a global variable.
    This variable will hold the value of the current array/list index that is being shown on screen (messageArea).

  2. Update the word being displayed in the messageArea using the value stored in the global variable.

  3. Update the value of the number that shows the current value of the Array/list index “1 of 3” ( pageNum) instead of a static / hard coded number.

    //Declare a global variable and set its value to zero.
    var global = 0;
    //update setText to hold value
    setText(“messageArea”, favoriteThings[global]);
    setText(“pageNum”, global + " of " + favoriteThings.length); // updates the values at the top of the screen

I have included a link to my appLab project with more explanation.


I appreciate the help. Thanks!


No problem, Your most welcome.


Does any one have an “answer key” for this lesson. I feel my students and I can get up to around stage 24 before there is little “assistance” from the program and the next think you know we are changing 5 things at once. If I could just see the code i could help guide the students better. This would be most helpful on the lessons that continue to build throughout the unit. Thank you.


There is an example solution to the right of the screen that will be of help for this lesson.


Thanks so much. I feel like such a heel…I have not opened this panel is so long.


I don’t have an example solution appear.
Also, is there a way to see students’ previous code or only their updated one since it updates with each progressive lesson?


If you have received teacher access from the code.org team and don’t see the example solution, please create a ticket. With lessons that scaffold, you can only see your students updated code.