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 trialmahesh gurbaxani
1,420 PointsWhat 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
Luke Glazebrook
13,564 PointsHi 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.
Harry James
14,780 PointsHarry James
14,780 Points+1 this answer :)