Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Simple Android App (2014) Improving Our Code Simple Refactoring: Using a Class

mahesh gurbaxani
mahesh gurbaxani
1,420 Points

What would be the code for getting all the fun facts in a serial order instead of in a random order

Tried the do while code but just could not get it.

1 Answer

Hi Mahesh!

I will give you a quick tip to get this working! Make sure that every time the button is clicked the following code is run to determine the fact.

fact = facts[i] + 1

However, you will need to make sure that this code does not push the index past the bounds of the array!

Good luck.