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 Kotlin for Java Developers Hello Kotlin! Stacking the Deck

Max Green
Max Green
12,406 Points

Passing parameter to the function

I'm curious at which point the function indexToCard has its parameter (the i: Int) passed to it? I'm aware of how all the logic works passing in each number from 0 - 51 but I just don't see where this information is being input. The only time a number is typed is the 52 in the Array creation but I'm pretty sure that's only stating the size of how large the array should be.